Licensing ios App

515
1
04-03-2018 01:33 AM
PhaniBhushankolla
New Contributor

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.

 

0 Kudos
1 Reply
JakeShapley
New Contributor III

Hi,

I believe that login request is coming from the ArcGIS Online service itself. The license key is for licensing the app. You can separately provide credentials programmatically when you load the layer, table, etc. See "Connect to secured content and services on ArcGIS Online" here: Access the ArcGIS platform—ArcGIS Runtime SDK for iOS | ArcGIS for Developers 

Alternatively, you could share that content publicly, if appropriate; then, no need for credentials.

Hope that helps.

Cheers,

Jake