Hi
I am having trouble after loading the lite license key to remove the watermark in the ArcGIS Runtime iOS SDK.
- The map (a GeoTIFF file) is displaying correctly when the license is not loaded. It shows with the watermark "Licensed For Developer Use Only". This is the relevant code.
func setupMap() {
guard let map = map else { return }
let raster = AGSRaster(fileURL: map.url)
let rasterLayer = AGSRasterLayer(raster: raster)
self.rasterLayer = rasterLayer
let agsMap = AGSMap(basemap: AGSBasemap(baseLayer: rasterLayer))
mapView.map = agsMap
}
- I am loading the license key as per the instructions here in the section "License your app with a license key". I put the code in the AppDelegate. This is the relevant code.
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
let arcGISLicenseKey = "<LITE_LICENSE_KEY_OBTAINED_FROM_DASHBOARD>"
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let result = try! AGSArcGISRuntimeEnvironment.setLicenseKey(arcGISLicenseKey)
switch (result.licenseStatus) {
case .invalid:
print("invalid license")
case .expired:
print("expired license")
case .loginRequired:
print("login required")
case .valid:
print("valid license")
@unknown default:
print("Unknown case for licenseStatus")
}
return true
}
}
When I run this code, the console prints "valid license" and I no longer see the message in the console of "Licensed For Developer Use Only" but the map is showing blank. I get no further messages in the console.
How can I load the license successfully and be able to load the map correctly?