Document Location SDK for iOS Guides Set Up Your Project Get an API Key

Get an API Key

How to Apply for a Key

Log in to the console, click the "Create credentials" button, and in the pop-up dialog box, proceed as follows: enter the API key name, select "iOS" as the associated service, and enter the security code Bundle ID.

Creating an AMAP API key with iOS selected as the associated service and Bundle ID configured for Location SDK

API key successfully created in the AMAP console showing the key string for an iOS Location SDK application

How to Obtain the Bundle Identifier

Below are two methods for obtaining the Bundle Identifier.

Method 1

Retrieve it programmatically using the following code:

NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];

Method 2

In Xcode, navigate to the General tab and locate the Bundle Identifier, as shown in the figure below:

Xcode General tab showing the Bundle Identifier field used for AMAP API key security code configuration