ArcGIS Runtime SDK for iOS

License your app

Before you deploy your ArcGIS Runtime app into production, you're required to license it with one of the four ArcGIS Runtime license levels: Lite (free), Basic, Standard, or Advanced.

Note that other costs may be incurred when deploying your app, such as credits used by ArcGIS Online services in your app. For example, if you use ArcGIS Online in your app and use more than 50 credits per month or your app generates revenue, you must purchase a deployment plan. For details on deployment plans, see Terms of Use – FAQ.

Note:
No license is required to develop ArcGIS Runtime apps; there's no need to authorize your development machine. For details on setting up your development environment, see the topic Install and set up.

Develop and test

You can download and install an ArcGIS Runtime SDK using an ArcGIS for Developer account. You then have access to all of the functionality in the API for development and testing purposes. In this mode, the app will adopt the following behavior:

  • Any map or scene will be watermarked with the words Licensed For Developer Use Only (as pictured here).
  • A message will be written to the console or log that states that the app is Licensed For Developer Use Only.

Licensing your app for deployment will remove the watermark and console output and provide the appropriate capabilities to your app users.

Licensing options

Before you can use your app in production, you are required to license the ArcGIS Runtime app. Esri provides four ArcGIS Runtime license levels: Lite, Basic, Standard, and Advanced. Each additional level opens more capabilities for your app users.

Two options are available to set the license level in your app:

Named user

A Named User refers to an ArcGIS organizational account that is a member of an organization in ArcGIS Online or ArcGIS Enterprise. The ability to license a Runtime app is just one feature of a Named User. You need to include code in your Runtime app to enable a user to sign in (log in) to a portal and return license details associated with their Named User account.

Use Named Users if your target audience has access to ArcGIS Online or ArcGIS Enterprise and use devices that will be online at least once every 30 days (timeout for a Named User license for ArcGIS Runtime). One notable benefit of this model is the license for ArcGIS Runtime travels with the Named User, not the app, so one Named User can license many ArcGIS Runtime apps.

License key

A license key is a text string that contains license details. License keys can be acquired through your ArcGIS for Developer account or purchased in ArcGIS Runtime deployment packs. License keys are usually compiled into your Runtime app. Each installation of your app available to a single user counts as a deployment.

Use a license key if your target audience does not have access to named user accounts with an ArcGIS Online organization or on-premises ArcGIS Enterprise portal, needs to use an application that will remain offline indefinitely, or needs to guarantee an application will function if offline more than 30 days. Customers are required to track the number of ArcGIS Runtime deployments at the Basic, Standard, and Advanced level. Each installation of your app available to a single user counts as a deployment.

Licensing capabilities

The following table shows the functionality associated with each license level, the available licensing options, and how to acquire a license. For details on API classes and members that require a paid license or extension, see Licensing.

License level CapabilitiesLicense KeyNamed User

Lite

Viewing maps, scenes, layers, and packages from the ArcGIS platform.

Edit features in public feature services. These services are available on the Internet and are not secured.

Generate a mobile geodatabase with features from a sync-enabled feature service.

Download updates from a sync-enabled feature service to a mobile geodatabase.

Place finding—see the note below regarding storage and the World Geocoding Service from ArcGIS Online.

Simple and optimized routing.

Calculate service areas and find closest facilities using a network service.

Available for free. Log in to your ArcGIS for Developers account, go to Licensing Your ArcGIS Runtime app, and copy the license key into your app.

Login as a level 1 or 2 Named User in an ArcGIS Online organization or on-premises Portal.

Basic

All capabilities of Lite.

Edit features in mobile geodatabases and features in feature services that are only accessible on a local network or are secured.

Synchronize edits to feature geometry, attributes, and attachments from a mobile geodatabase to a feature service.

Add, update, or delete content on portals.

Deployment packs available for purchase.

Contact the Esri office that serves you or if you are in the United States call Esri at 1-800-447-9778.

Login as a level 2 Named User in an ArcGIS Online organization or on-premises Portal.

Standard

All capabilities of Basic.

Access to additional data, including shapefiles, GeoPackages, ENC layers (S-57), local raster layers, use of raster functions, and local raster elevation sources.

Visual analysis, including line of site and viewshed.

Deployment packs available for purchase.

Contact the Esri office that serves you or if you are in the United States call Esri at 1-800-447-9778.

Not available yet.

Advanced

Adds Local Server support with Java, .NET and Qt SDKs only.

Deployment packs available for purchase.

Contact the Esri office that serves you or if you are in the United States call Esri at 1-800-447-9778.

Not available yet.

Extension licenses

ArcGIS Runtime offers extensions that provide access to additional capabilities, analysis tools, and/or data.

Extension licenseCapabilitiesLicense KeyNamed User

Analysis

Minimum Runtime license level: Standard

Calculate service areas and find closest facilities using a local network dataset

StreetMap Premium for ArcGIS Runtime

Works with all license levels

  • Use offline with mobile map packages
  • High-quality cartography maps
  • Offline Geocoding
  • Offline Routing

StreetMap Premium can be downloaded for these regions:

  • North America
  • Latin America
  • Europe
  • Asia Pacific
  • Middle East and Africa
  • Japan

Each regional mobile map package is licensed with an extension license key. You can use any combination of these packages with their associated license keys.

Note:

StreetMap Premium for ArcGIS Runtime licenses are purchased and provided by the customer. You must provide a mechanism for your app to access this license key. The StreetMap Premium data cannot be used after the license has expired. Upon expiration the app user must purchase another license to continue using the data. You must provide the correct messages in your app to notify the user that their license has expired or is due to expire.

Licenses available for purchase.

StreetMap Premium for ArcGIS Runtime extension licenses are provided on an annual-term basis. The StreetMap Premium dataset cannot be used after the license has expired.

Contact the Esri office that serves you or if you are in the United States call Esri at 1-800-447-9778.

Not available yet.

Store geocode results from ArcGIS Online

The World Geocoding Service from ArcGIS Online includes a for_storage parameter. Storing the results of a geocode or reverse geocode operation using this service (by setting the for_storage parameter to true) requires an ArcGIS Online paid subscription and uses credits from the subscriber's account. Additionally, the user performing a paid operation must be assigned a user role that includes the Geocoding privilege. For more information, see Free vs paid in the REST documentation for this geocode service and Levels, roles, and privileges in ArcGIS Online documentation.

Named user levels

Beginning with the release of ArcGIS Enterprise 10.5, members in an organization in ArcGIS Online or on-premises ArcGIS Enterprise portal can be assigned one of two membership levels . Level 1 can be used to license Runtime at the Lite level and Level 2 can be used to license Runtime at the Lite and Basic level. For Portals prior to version 10.5, all Named Users are equivalent to Level 2 and can be used to license Runtime at the Basic level.

Use tile packages from ArcGIS Online basemaps

App developers may use ArcGIS Online basemaps for their apps. Esri has designed a use policy that seeks to maximize the use of these basemaps by the ArcGIS Runtime developer community. The rules for using these basemaps are conditioned on how the basemaps are used.

A developer can only export basemaps from services that support the export map operation.

A developer may:

  • Export basemaps as tile packages for use with an ArcGIS Runtime app, up to the limits imposed by the basemap for a single tile package.
  • Use an ArcGIS Runtime app to export basemaps on demand. Authorization must be as a named user or with an app login.
  • Embed or bundle basemap tile packages in an ArcGIS Runtime app.
  • Use an ArcGIS Runtime app to download pre-created basemap tile packages hosted by ArcGIS Online or ArcGIS Enterprise, but only if the ArcGIS Online organization or ArcGIS Enterprise is licensed for production use.

A developer may not:

  • Allow their users to use the exported content outside of ArcGIS technology.
  • Allow their users to unbundle the exported content and publish the exported content as a map service.
  • Allow their users to unbundle the exported content or redistribute to other users.
  • Systematically harvest map tiles using the service (a practice often referred to as "scraping tiles").

License your app

Follow these steps to license your app by with a license key or a Named User account. After this is done, the watermark and debug messages will no longer display and your app will be ready for distribution and use in production.

Note:

If you fail to license the app then the map and scene views will be watermarked with the words Licensed For Developer Use Only.

License your app with a license key

Using a license key involves adding code to set the license level at compile time so that the license key is built into the application.

  1. Read the end user license agreement.
  2. Find a location in your code that runs before any ArcGIS Runtime functionality is used.
  3. Call the setLicenseKey method on the AGSArcGISRuntimeEnvironment singleton object to license the app with a License key.

    //license the app with the supplied License key
    do {
     let result = try AGSArcGISRuntimeEnvironment.setLicenseKey("runtimelite,1000,rud#########,day-month-year,####################")
     print("License Result : \(result.licenseStatus)")
    }
    catch let error as NSError {
     print("error: \(error)")
    }

Your app is now licensed for deployment.

License your app with a Named User account

Use of a Named User involves adding code to enable sign-in to using an ArcGIS organizational account. At runtime, a user must sign in successfully to return their license information which will be used by the app to set the license level. Follow these steps to license your app using the Named User's account:

  1. Read the end user license agreement.
  2. Find a location in your code that runs before any ArcGIS Runtime functionality is used.
  3. Allow the app user to authenticate with an ArcGIS organizational account. Upon loading the AGSPortal obtain the AGSLicenseInfo and use this to license the app. As part of the process, save the license information in preparation for your app being used in an offline environment for up to 30 days.

    //construct the portal class and ensure that the Named User provides their credentials       
    let theURL = URL(string: "https://myportal.com")
    
    //request that the Named User logs in with their credentials 
    let portal = AGSPortal(url: theURL!, loginRequired: true)
     
    //load the portal       
    portal.load { (error) in
     if let error = error {
      print(error)
     }
     else {
      
      //get the users license info from the portal info              
      let licenseInfo = portal.portalInfo?.licenseInfo
    
      //set the license using the Named Users licenseInfo
      do {
       let result = try AGSArcGISRuntimeEnvironment.setLicenseInfo(licenseInfo!) 
      }
      catch let error as NSError {
       print("error: \(error.localizedDescription)")
      }
      
      //The app is now licensed
    
      // Save the license information so that the app can be started and licensed offline
      // In this example the licenseDictionary is stored in keychain
                    
      var licenseDictionary: NSDictionary?
                    
      do {licenseDictionary = try licenseInfo?.toJSON() as! NSDictionary?
      } catch {
       print("LicenseInfo not available")
      }
    
      let keychainItem = AGSKeychainItem(identifier: "com.your_org.your_app_name", accessGroup: nil, acrossDevices: false)
      keychainItem.writeObject(toKeychain: licenseDictionary!, completion: { (writeError) in
       if let error = writeError {
        print("Error writing to the Keychain... \(error)")
       }
      })        
     }
    }

    Note:

    If your app persists license information as shown above, you must declare that your app uses cryptography when deploying to Apple's App Store using iTunes Connect. The Runtime API uses encryption to protect the license information.

  4. If you saved the license information on local storage, your app can be started and licensed in an offline environment using the saved license information. Retrieve the license from storage and license your app.

    //locate the keychain
    let keychainItem = AGSKeychainItem(identifier: "com.your_org.your_app_name", accessGroup: nil, acrossDevices: false)
            
    //return the license JSON from the keychain                
    let licenseDictionary = keychainItem.readObjectFromKeychain() as? NSDictionary
    
    //construct the license info from the JSON
    let licenseInfo = try! AGSLicenseInfo.fromJSON(licenseDictionary!) as? AGSLicenseInfo
    
    //license the app with the license Info
    AGSArcGISRuntimeEnvironment.setLicenseInfo(licenseInfo!, error: errorPointer)

Extension level licenses

  1. Read the end user license agreement.
  2. Find a location in your code that runs before any ArcGIS Runtime functionality is used.
  3. Call the setLicenseKey:extensions method on the AGSArcGISRuntimeEnvironment singleton object to license the app with a main license key and any extension licenses.

    In this code extension level license keys are applied to access the North America and Latin America StreetMap Premium for ArcGIS Runtime mobile map packages.

    let error : NSErrorPointer = nil
    
    AGSArcGISRuntimeEnvironment.setLicenseKey("runtimeadvanced,1000,rud#########,day-month-year,####################", 
     extensions: ["runtimesmpna,1000,rud#########,day-month-year,####################",
                  "runtimesmpla,1000,rud#########,day-month-year,####################" ], error: error)

Your app is now licensed to use the extensions.

Attribute Esri in your app

Esri requires that when you use an ArcGIS Online basemap, Esri data services, or Esri API technology in your app you must also include Esri attribution. There are specific requirements for attribution you may be required to address in your app depending on how your app is built and the data it uses. This is outlined in detail here in the Attribution in your app topic.