#1
Posted
:
Friday, April 21, 2017 11:21:24 AM(UTC)
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.htmlOne 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-licenseIOS:1. First you need to add your license file to your Xcode project as a resource:
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.
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.