Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, April 21, 2017 11:21:24 AM(UTC)

Roberto  
Roberto

Groups: Registered, Tech Support, Administrators
Posts: 39

Thanks: 2 times
Was thanked: 3 time(s) in 3 post(s)

A detailed tutorial for this can be found here: https://www.leadtools.com/help/sdk/tutorials/ios-swift-add-references-and-set-a-license.html

One of the more common issues we see in the support queue are issues with setting a license. This post will focus on the iOS mobile platform and setting a license there. You can reference additional information regarding setting a license in this FAQ post: https://www.leadtools.co...urchased-imaging-license

IOS:

1. First you need to add your license file to your Xcode project as a resource:

add lic to proj
2. Once the license file has been added to your project, you can set your license/developer key via code:
Swift:
Code:
let licensePath = NSBundle.mainBundle().pathForResource(“LEADTOOLS” ofType: “LIC”) 
let developerKey = “Copy contents of developer key here” 
do { 
    try LTRasterSupport.setLicenseFile(licensePath, developerKey: developerKey) 
} 
catch let error as NSError { 
    print(error.localizedDescription) 
} 


Objective-C:
Code:
NSString *licensePath = [[NSBundle mainBundle] pathForResource:@”LEADTOOLS” ofType:@”LIC”]; 
NSString *developerKey = @“Copy contents of developer key here”; 
NSError *error = nil; 
             
if (![LTRasterSupport setLicenseFile:licensePath developerKey:developerKey error:&error]) { 
       NSLog(@”%@”, error.localizedDescription); 
} 

3. Since App Bundles are easy to extract and get the contents of, DO NOT INCLUDE YOUR DEVELOPER KEY FILE in the app bundle. If you do this, users of your App may be able to steal your license/key and use it to develop Applications using your information.

Edited by moderator Wednesday, December 27, 2023 11:37:25 AM(UTC)  | Reason: Not specified

Roberto Rodriguez
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.041 seconds.