Install and set up

There are two ways to install and use the API in your Xcode project. You can choose the manual download and install process or use CocoaPods.

Manual download

The manual download installs the API once for all iOS projects.

Download iOS package installer
  1. Download the SDK package installer.
  2. Make sure you have write permissions to the ${HOME}/Library folder.
  3. If you have installed a previous version of ArcGIS Runtime API for iOS on this machine, uninstall it. Otherwise, the previous installation will be overwritten. To uninstall, run the ${HOME}/Library/Application Support/AGSiOSRuntimeSDK/uninstallAGSiOSSDK script in the Terminal application.
  4. After you've downloaded the SDK, double-click the downloaded .pkg file. Follow the install wizard instructions to complete the installation procedure.
  5. Complete the additional steps for configure a project.
  6. By default, the API is installed in ${HOME}/Library/SDKs/ArcGIS. This folder contains the following subfolders: Frameworks, Legal, and Samples.

You can go to the Samples folder and run either the Objective-C or Swift sample to ensure that everything was installed correctly on your machine.

If you encounter installation errors, see the install.log file at /var/log/install.log for more information. A common reason for failure is the installation package was corrupted during download. Try downloading the package again. On rare occasions, the installer may ask you for your username/password during installation. When this happens, the installer finishes successfully but the SDK gets installed in the root directory instead of in your home directory. To resolve this issue, you can manually copy the SDKs folder from the root /Library directory into your user profile's $HOME/Library directory.

Use CocoaPods

The ArcGIS Runtime API for iOS is available as a registered CocoaPod. If you are new to CocoaPods, review learn how to get started with CocoaPods, and then follow these instructions to use this pod within your iOS project:

  1. Add pod 'ArcGIS-Runtime-SDK-iOS', '100.10' to your project's Podfile.
  2. Run the command pod install on the Podfile using the Terminal application. This will download the ArcGIS framework to your machine and place it inside your project's Pod directory. It will also make the necessary changes to your project's build settings to correctly reference the ArcGIS framework and create a new Xcode workspace (.xcworkspace file).

To use the ArcGIS API, open the newly created Xcode workspace and add the following import statement to any of your swift code (.swift) files:

 
import ArcGIS

Configure a project

After manually installing the API as described above, configure each Xcode project to use the API.

Add ArcGIS framework to the project

  1. Open an Xcode project or create a new one.
  2. Select the project node in the left Navigator pane, select a target node, and choose the General tab.
  3. In the Frameworks, Libraries, and Embedded Content section, drag and drop the ArcGIS.xcframework file from the $(HOME)/Library/SDKs/ArcGIS/Frameworks directory as shown below :

Xcode choose framework

That's it. To use the ArcGIS API, add the following import statement to any of your swift code (.swift) files:

 
import ArcGIS

Additional downloads

You can do many things with this API. Here are a few things to consider.

StreetMap Premium

If you want to use StreetMap Premium data (the StreetMap Premium extension), download the demonstration data from the downloads page for development and testing. Please contact Esri Customer Service for access to a region of your choice for development and testing or to license StreetMap Premium data for deployment.

Supplemental data

If your app uses grid-based transformations, download supporting Projection Engine files from the downloads page.

If your app displays ENC layers, download the hydrography directory from the downloads page.

Next steps