Get started

Here's how to get started with ArcGIS Maps SDK for Swift:

  1. Review system requirements
  2. Install and set up the API
  3. Get an API key (to access services)
  4. Start the Display a map tutorial

1. System requirements

Ensure the correct version of macOS and Xcode are installed and your development environment meets the system requirements.

2. Install and set up

The ArcGIS Maps SDK for Swift can be easily integrated into your Xcode project using Swift Package Manager.

Xcode 14
  1. Open your Xcode project. In the menu bar, select File > Add Packages...
  2. In the search bar, enter https://github.com/esri/arcgis-maps-sdk-swift as the package repository URL.
  3. Optionally, select an option for the Dependency Rule if you want to specify an exact version or a range of versions to use.
  4. Click Add Package.

Swift Package Manager

To use this API, add the following import statement to any of your swift code (.swift) files:

Use dark colors for code blocksCopy
 
1
import ArcGIS

3. Access services and content with an API key

API keys are permanent tokens that grant your application access to ready-to-use services and, with an ArcGIS Developer account, private content hosted in ArcGIS (currently in beta). Your apps will always require an access token, such as an API key or OAuth 2.0 token, in order to access these resources. Refer to authentication methods in the developer guide for details.

To set an API key in your application, find and copy an API key from your developer dashboard and replace the string YOUR_API_KEY / ACCESS_TOKEN in your code with the API key copied from your dashboard. This key is scoped to provide access to all of the services and resources shown in the tutorials.

  1. Log in to your developer dashboard.
  2. Select and copy your default API key, or generate a new one.
  3. In your code, replace the string YOUR_API_KEY / ACCESS_TOKEN with the API key from your dashboard.

4. Tutorials

Follow step-by-step instructions to build apps that incorporate key features of ArcGIS Maps SDK for Swift.

Display a map

Add a point, line, and polygon

Display a web map

Display device location

Browse all tutorials

Deploy your app

No license is required to develop your apps; there's no need to authorize your development machine or devices. As a member of the ArcGIS Developer Program, you have a free ArcGIS Developer Account (Essentials Plan). With this plan, you can download and install any ArcGIS SDK and immediately have access to all the functionality of the APIs for development purposes. You can become a member of the developer program for free.

You need an ArcGIS Developer Subscription to deploy an app to your users. The Essentials plan is free.

Learn more about licensing and deployment and get your license string at License and deployment.

Next steps

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.