Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API Key instructions #772

Merged
merged 9 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions Examples/ExamplesApp/ExamplesApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ struct ExamplesApp: App {
}

init() {
#warning("Require user to sign in with an ArcGIS identity or set your developer API key")
#warning("You must set your API Key or request that the user signs in with an ArcGIS account")
/*
Use of Esri location services, including basemaps and geocoding, requires either an ArcGIS identity or an API Key. For more information see https://links.esri.com/arcgis-maps-sdk-security-auth.
1) ArcGIS identity: An ArcGIS named user account that is a member of an organization in ArcGIS Online or ArcGIS Enterprise.
2) API key: A permanent key that gives your application access to Esri location services. Create a new API key or access existing API keys from your ArcGIS for Developers dashboard (https://links.esri.com/arcgis-api-keys).
Production deployment of applications built with ArcGIS Maps SDK requires you to license ArcGIS Maps SDK functionality. For more information see https://links.esri.com/arcgis-maps-sdk-license-and-deploy.
Use of ArcGIS location services, such as basemap styles, geocoding, and routing services, requires either user authentication or API key authentication. For more information see https://developers.arcgis.com/documentation/security-and-authentication/types-of-authentication/ or https://developers.arcgis.com/swift/security-and-authentication/.
1) User authentication: Allows users with an ArcGIS account to sign into an application and access secure services.
2) API key authentication: A long-lived access token that gives your application access to secure services. Go to the [Create an API key](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/tutorials/create-an-api-key/) tutorial to copy the API key access token. To access all services used by this application set the location services privileges to:

Location services > Basemaps
Location services > Geocoding

Production deployment of applications built with the ArcGIS Maps SDK for Swift requires that you license your app. For more information see https://developers.arcgis.com/swift/license-and-deployment/.
*/
// Uncomment the following line to access Esri location services using an API key.
// Uncomment the following line to access ArcGIS location services using an API key.
// ArcGISEnvironment.apiKey = APIKey("<#API Key#>")
}
}
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ The *ArcGIS Maps SDK for Swift Toolkit* has a *Target SDK* version of *16.0*, me

New to Swift Package Manager? Visit [swift.org/package-manager/](https://swift.org/package-manager/).

## Configure API Key
## Configure API Key & Licensing

Some of the toolkit components and examples utilize a set of ready-to-use ArcGIS Platform services, including basemaps, and therefore require an API Key to be set in `ExamplesApp.swift`. Please see the [setup guide](https://developers.arcgis.com/swift/get-started/#3-access-services-and-content-with-an-api-key/) for more information.
Use of ArcGIS location services, such as basemap styles, geocoding, and routing services, requires either user authentication or API key authentication. Some of the toolkit components and examples utilize a set of these ready-to-use ArcGIS location services, including basemap styles, and therefore require an API Key to be set in `ExamplesApp.swift`. Please see [Get started](https://developers.arcgis.com/swift/get-started/#3-get-an-access-token), [Create an API Key](https://developers.arcgis.com/documentation/security-and-authentication/api-key-authentication/tutorials/create-an-api-key/) and [API Key Authentication](https://developers.arcgis.com/swift/security-and-authentication/#api-key-authentication) for more information.

Production deployment of applications built with the ArcGIS Maps SDK for Swift requires that you license your app. For more information, see [License and deployment](https://developers.arcgis.com/swift/license-and-deployment).

## Additional Resources

Expand Down