Here's how to get started with ArcGIS Maps SDK for Swift:
- Review system requirements
- Install and set up the API
- Get an API key (to access services)
- Start the Display a map tutorial
Ensure the correct version of macOS and Xcode are installed and your development environment meets the system requirements.
The ArcGIS Maps SDK for Swift can be easily integrated into your Xcode project using Swift Package Manager.
- Open your Xcode project. In the menu bar, select File > Add Packages...
- In the search bar, enter
https:as the package repository URL.
- Optionally, select an option for the Dependency Rule if you want to specify an exact version or a range of versions to use.
- Click Add Package.
To use this API, add the following import statement to any of your swift code (.swift) files:
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
ACCESS_ 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.
- Log in to your developer dashboard.
- Select and copy your default API key, or generate a new one.
- In your code, replace the string
ACCESS_with the API key from your dashboard.
- Learn more about API keys in the developer guide.
Follow step-by-step instructions to build apps that incorporate key features of ArcGIS Maps SDK for Swift.
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.