Introduction

ArcGIS API for iOS allows you to add mapping and GIS functionality to your iPhone, iPod touch, and iPad applications. The API leverages functionality provided by ArcGIS Server services through the REST interface. The API primarily provides a map component and tasks. The map component displays maps from constituent layers. These layers rely on backing Tiled and Dynamic map services. You can also add Graphics on the map to display your own points or areas of interest. Tasks provide functionality such as identifying features on a map, querying features given some criteria, geocoding and reverse geocoding addresses, running geoprocessing jobs, etc.

The API is available in a single static library called libArcGIS.a. Classes and functions defined in this library begin with the prefix AGS. This prefix acts as a namespace and prevents naming conflicts with classes defined in your application or other frameworks you use.

Setting up your XCode project

ArcGIS API for iOS is built using the iOS4 SDK. You need to use a minimum of iOS 4 SDK to build your applications. Be sure to set your XCode project's Base SDK setting accordingly. Even though you need to build with the aforementioned SDKs, you can still target devices running iPhone OS 3.1.2 or higher. You can do this by configuring your XCode project's iPhone OS Deployment Target setting and adding runtime checks to ensure that your application does not use features that are unavailable on the target device/platform.

The ArcGIS library depends upon the following frameworks and libraries. These need your XCode project as references -

You also need to set the project's Library Search Paths setting to include ${HOME}/Library/SDKs/ArcGIS/iOS.sdk/usr/local/lib and the User Header Search Path setting to include ${HOME}/Library/SDKs/ArcGIS/iOS.sdk/usr/local/include/ ** (recursive)

Finally, you must also specify use the -ObjC and -all_load linker flags in your project's Other Linker Flags build setting. This is because the ArcGIS library defines Objective-C categories which do not get loaded without these flags. See this for more information.