"developer use only" artifacts?

1481
10
01-25-2019 11:31 AM
WorthSparks
New Contributor III

In my code I used "AGSArcGISRuntimeEnvironment.setLicenseInfo(licenseInfo)" to eliminate the message, "Licensed for developer use only" from the mapView. This works but now I have these artifacts showing that look like they are left over from the "developer use only" message. See the artifacts inside the red circle in the bottom left corner of the screen shot below:

Does anyone know what this is or how to eliminate it?

Tags (1)
0 Kudos
10 Replies
SuganyaBaskaran1
Esri Contributor

Hello, 

Which version of the SDK are you using, and what level license did you set? 

0 Kudos
WorthSparks
New Contributor III

ArcGIS Runtime SDK for iOS 100.4. I set it to "editor" based on the licenseInfo I got from the logged in user.

0 Kudos
Nicholas-Furness
Esri Regular Contributor

Is it possible that this is some other UIView that's just floating over the map view? Can you use the Debug View Hierarchy tool in Xcode to check?

If not, you might try this: You will anyway have to license your app when you release/deploy it. If you're relying on a user to log in, until they log in you should use your Lite License key (which you can find in your developers dashboard) to remove the "Licensed for Developer Use Only" watermark. Set that in your UIApplicationDelegate.applicationDidFinishLaunchingWIthOptions() implementation (update: technically you could wait until you first use the Runtime in your code path to set the license, but it's almost always easiest to just follow this process and license on app initialization, then update the license whenever a user logs in or you clear cached credentials).

If you do that, do you still see this artifact?

We'll still need to look into it, but for a deployed app you should never display that watermark, so in practice you might never encounter the artifact.

WorthSparks
New Contributor III

All the views are accounted for, both ArcGIS's and mine. So I tried your second idea. I didn't know I needed to set the lite license if I was already going to setLicenseInfo() with the user's licenseInfo before I displayed the mapView. Anyway, the problem is fixed now by doing what you said. This is how I did it:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

    ...
    let licenseKey = "insert your license key here"
    do {
        let _ = try AGSArcGISRuntimeEnvironment.setLicenseKey(licenseKey)
    } catch let error as NSError {
        print(error)
    }

    ...
    return true
}

So the artifact is now gone. Thanks.

0 Kudos
Nicholas-Furness
Esri Regular Contributor

Cool. Glad it's fixed it, but I might ping you directly to help us get a repro case.

I should clarify since I didn't fully understand your app's flow: you don't technically need to apply a license until your code makes use of the Runtime (for most people this means showing a Map View). If you haven't yet obtained a license through a user login when you use the Runtime, you must use a license key, and in most cases that just means your Lite key. Usually it's just easiest to cover all bases with the approach you used above: use the Lite key on app init, then license appropriately whenever the login changes.

I'll update my comment above to reflect this.

Cheers,

Nick

MichaelDavis3
Occasional Contributor III

Getting the same thing here... it's definitely the "Developer Use Only" text all squished up.  Guessing the width is being set to zero or something and it's not actually being removed from the view hierarchy.

In my case the map is the first thing the user sees and waiting until I get a license code (either plugging in a code from the keychain, or downloading one from our in-house license code service) before drawing the map isn't really a workable solution.  Once the runtime code is authorized the text collapses into the little blurry thing you see in the screen shot.

0 Kudos
Nicholas-Furness
Esri Regular Contributor

Hi Michael Davis‌,

Thanks for confirming that you also see this - that's helpful.

You should not be showing a map without a license in production. That's only allowed during development and testing. See License your app—ArcGIS Runtime SDK for iOS | ArcGIS for Developers 

In your case, embed and use your Lite license on application startup until such time as you get a better license.

I will try to reproduce the behavior here.

Cheers,

Nick.

0 Kudos
MichaelDavis3
Occasional Contributor III

I understand the licensing requirements.  For our enterprise data collection apps we primarily use runtime codes to authorize the app.  Those apps typically spin up views (including a map view) while a background process is handling various housekeeping tasks, including pulling the license out of the keychain or requesting one from our license request endpoint (first run).  When I'm running in the simulator or on my development devices we use a development code that is requested on every run.

This process was put in place to comply with the ESRI requirement that runtime codes only be used once.  It seems as if that requirement has evolved a bit over the years and perhaps that restriction no longer applies... however we still want to use that mechanism to keep track of the number of installs for ELA reporting purposes. 

I am in the process of converting one of those apps from the 10.2.5 SDK to v100.  For whatever reason the Developer warning shows up on the initial map view load now, and is squished up like the screenshot above once the code is plugged in.

Is the lite license the one that is displayed in my developer.esri.com account?

0 Kudos
Nicholas-Furness
Esri Regular Contributor

Yeah. It's in your dashboard front-and-center with the new site redesign now.

I'll ping you directly to make sure I'm not misunderstanding something - want to make sure a) you don't see the squished up watermark and b) I'm not confusing or complicating things for you.

0 Kudos