There are a number of ways to get started to develop with ArcGIS Maps SDK for Swift. If you are new, follow the steps below to get started with Swift and Xcode.

1. Sign up for an account

To use ArcGIS Maps SDK for Swift to access content Content is a collection of items in a portal that belong to a user, group, or organization. Learn more , services A service, also known as an ArcGIS service, is software that supports an ArcGIS REST API and provides geospatial functionality or data. A service can be hosted by Esri or in ArcGIS Enterprise. Learn more , or an organization, you need an ArcGIS Location Platform account An ArcGIS Location Platform account, formerly known as an ArcGIS Developer account, is an identity associated with an ArcGIS Location Platform subscription. Learn more , ArcGIS Online account An ArcGIS Online account, also known as an ArcGIS Organization account, is an identity associated with an ArcGIS Online subscription. It can be used to access ArcGIS tools and develop applications with ArcGIS location services for an organization. Learn more , or ArcGIS Enterprise account An ArcGIS Enterprise account is an identity for an instance of ArcGIS Enterprise. It can be used to access ArcGIS Enterprise tools, applications, and services, and to develop applications. Learn more . The type of account, user type, and role you need depends on the resource you need to access and the operations you wish to undertake.

If you do not have an account, select one of the options below:

Get a free account for ArcGIS Location Platform

Get an account for ArcGIS Online



2. Get the SDK and dependencies

Install a supported version of Xcode

  1. Download Xcode and follow installation instructions.

Get the ArcGIS Maps SDK for Swift

  1. Open your Xcode project. In the menu bar, select File > Add Package Dependencies…
  2. In the search bar, enter https://github.com/Esri/arcgis-maps-sdk-swift as the package repository URL.
  3. Click Add Package.
  4. Import the API to any of your .swift files using: import ArcGIS.

For more details, go to Install and set up.

3. Implement authentication

To access secure ArcGIS services and resources, you need to implement authentication. The easiest way to get started is to obtain an access token An access token is an authorization string that provides access to secure ArcGIS content, data, and services. Its capabilities are determined by the privileges it supports. It is obtained by implementing API key authentication, User authentication, or App authentication. Learn more from an API Key An API key is a long-lived access token created using API key credentials. They are valid for up to one year and are typically embedded directly into client applications. Learn more and implement API key authentication API key authentication is a type of authentication that uses an API key to authenticate requests to ArcGIS services and secure portal items. Learn more . If you want to build an app that requires users to sign in with their ArcGIS account, implement user authentication User authentication is a type of authentication that allows users with an ArcGIS account to sign into an application and allow it to access ArcGIS content, services, and resources on their behalf. The typical authorization protocol used is OAuth2.0. Learn more .

API key authentication

User authentication

4. Create your first mapping application

Follow the step-by-step instructions in the Display a map tutorial to create your first mapping application. The following code shows how you can create and display a map.

// Creates a map with the topographic basemap style.
@State private var map = Map(basemapStyle: .arcGISTopographic)
// Creates a map view with the map.
var body: some View {
MapView(map: map)
}

Once you are done building your application, make sure to license it before deploying to production. For more information, see License and deployment topic for details.

5. Follow the tutorials

Go to the tutorials to create and run applications to perform different operations.

6. Explore the samples

Go to the samples to learn how to perform more tasks with the API.