Where should we enter the license key in our app, after we purchase the licensed version.
Solved! Go to Solution.
Oh, I see
Find a location in your code that runs before any ArcGIS Runtime functionality is used. Call the setLicenseKey method on the AGSArcGISRuntimeEnvironment singleton object to license the app with a License key.
In iOS/macOS app that would be in `viewDidLoad` method, right after `super.viewDidLoad()` is called.
regards,
David
Hi!
For detailed licensing information I would recommend our developer pages: License your app—ArcGIS Runtime SDK for iOS | ArcGIS for Developers
David
Hi, I understood the licensing thing, but I am unable to figure out , where we should provide the license key in our code, so that I won't get a pop up to enter my username and password, every time I run the app.
Oh, I see
Find a location in your code that runs before any ArcGIS Runtime functionality is used. Call the setLicenseKey method on the AGSArcGISRuntimeEnvironment singleton object to license the app with a License key.
In iOS/macOS app that would be in `viewDidLoad` method, right after `super.viewDidLoad()` is called.
regards,
David
Hi David,
I have set the license in the viewDidLoad method as shown below. Still I am getting the pop to enter my credentials everytime I run my app.
override func viewDidLoad() {
super.viewDidLoad()
do
{
let result = try?AGSArcGISRuntimeEnvironment.setLicenseKey("
runtimelite,1000,******,none,********")
print("Registration is \(result?.licenseStatus.rawValue)")
}
catch
{
print(error)
}
}
I am getting the response even if I do not enter the credentials, as the license is set and the "Developer Use Only" label is not getting displayed on the map.