Working with status code 1025#
Applies to LUNA ID for iOS only.
Status code 1025 applies to LUNA ID for iOS and informs about a license activation failure.
To retrieve status code 1025 and its corresponding error message, do the following:
1․ Call the activateLicense method. Here is an example of how you might set this up:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
AppAppearance.setupAppearance()
guard let configPath = Bundle.main.path(forResource: "luna_config",
ofType: "plist"),
let licensePath = Bundle.main.path(forResource: "vllicense",
ofType: "plist") else {
return false
}
let config = LunaCore.LCLunaConfiguration(plistFilePath: configPath)
let license = LunaCore.LCLicenseConfig(plistFilePath: licensePath)
if let lunaService = LunaCore.LCLunaIDServiceBuilder.buildLunaIDService(withConfig: config,
license: license) {
if let error = lunaService.activateLicense() {
debugPrint("license activation FAILED with error: <\(error.localizedDescription)>")
return false
}
}
else {
debugPrint("license activation FAILED, please check license EID and ProductID and existence of config file")
return false
}
debugPrint("license activated")
let viewController = LERootViewController()
let navvc = UINavigationController(rootViewController: viewController)
window = UIWindow(frame: UIScreen.main.bounds)
window?.backgroundColor = .white
window?.rootViewController = navvc
window?.makeKeyAndVisible()
return true
}
2․ Get the error message by calling (error as NSError).localizedDescription. This will give you a more detailed description of what went wrong.
3․ Get the error code by calling (error as NSError).code. This will help you identify and troubleshoot specific issues related to the license activation process.