You're all set!

To start developing, please head over to our developer documentation.

Activate the Google Maps SDK for iOS

To get you started we'll guide you through the Google Developers Console to do a few things first:

  1. Create or choose a project
  2. Activate the Google Maps SDK for iOS
  3. Create appropriate keys
Continue

Get API Key

To use the Google Maps SDK for iOS, you must register your app project on the Google API Console and get a Google API key which you can add to your app.

Quick guide to getting and using an API key

Step 1: Get an API Key from the Google API Console

Click the button below, which guides you through the process of registering a project in the Google API Console, activates the Google Maps SDK for iOS automatically, and generates a generic, unrestricted API key.

Get a Key

Notes:

  • Tip: During development and testing, you can register a project for testing purposes in the Google API Console and use a generic, unrestricted API key. When you are ready to move your app into production, register a separate project for production, create an iOS-restricted API key, and add the key to your application.
  • Premium Plan customers: For production-ready apps, you must use an iOS-restricted API key that is set up in the Google Maps APIs Premium Plan project created for you when you purchased the Premium Plan.
  • For more information, see the detailed guides below for Standard Plan and Premium Plan customers.

Step 2: Add the API key to your application

Swift

Add your API key to your AppDelegate.swift as follows:

  1. Add the following import statement:
    import GoogleMaps
  2. Add the following to your application(_:didFinishLaunchingWithOptions:) method, replacing YOUR_API_KEY with your API key:
    GMSServices.provideAPIKey("YOUR_API_KEY")
  3. If you are also using the Places API, add your key again as shown here:
    GMSPlacesClient.provideAPIKey("YOUR_API_KEY")

Objective-C

Add your API key to your AppDelegate.m as follows:

  1. Add the following import statement:
    @import GoogleMaps;
  2. Add the following to your application:didFinishLaunchingWithOptions: method, replacing YOUR_API_KEY with your API key:
    [GMSServices provideAPIKey:@"YOUR_API_KEY"];
  3. If you are also using the Places API, add your key again as shown here:
    [GMSPlacesClient provideAPIKey:@"YOUR_API_KEY"];

More about API keys

  • The API key allows you to monitor your application's API usage in the Google API Console. See Google API Console help for more information.
  • The key is free, you can use the same key with any of your iOS applications, and it supports an unlimited number of users.
  • You obtain an API key in the Google API Console and restrict the API key by providing your application's bundle identifier.
  • If you are a Premium Plan customer, you must use an API key to access all the custom features and benefits of your Premium Plan.
  • Registering for an API key ensures that Google can contact you about your application if necessary.

Detailed guide to getting an API key

Detailed guide for users of the standard Google Maps SDK for iOS

Follow these steps to get an API key:

  1. Go to the Google API Console.
  2. Create or select a project.
  3. Click Continue to enable the Google Maps SDK for iOS.
  4. On the Credentials page, get an API key.
    Note: If you have a key with iOS restrictions, you may use that key. You can use the same key with any of your iOS applications within the same project.
  5. From the dialog displaying the API key, select Restrict key to set an iOS restriction on the API key.
  6. In the Restrictions section, select iOS apps, then enter your app's bundle identifier. For example: com.example.hellomap.
  7. Click Save.

    Your new iOS-restricted API key is a string of characters that appears in the list of API keys for your project. Below is an example of an API key.

    AIzaSyBdVl-cTICSwYKrZ95SuvNw7dbMuDt1KG0

Detailed guide for users of the Google Maps APIs Premium Plan license

Follow these steps to get an API key:

  1. Go to the Google API Console.
  2. From the Project drop-down menu, select the project created for you when you purchased theGoogle Maps APIs Premium Plan. The project name starts with Google Maps APIs for Business or Google Maps for Work or Google Maps.
  3. Click Continue.
  4. On the Credentials page, get an API key.
    Note: If you have a key with iOS restrictions, you may use that key. You can use the same key with any of your iOS applications within the same project.
  5. From the dialog displaying the API key, select Restrict key to set an iOS restriction on the API key.
  6. In the Restrictions section, select iOS apps, then enter your app's bundle identifier. For example: com.example.hellomap.
  7. Click Save.

    Your new iOS-restricted API key is a string of characters that appears in the list of API keys for your project. Below is an example of an API key.

    AIzaSyBdVl-cTICSwYKrZ95SuvNw7dbMuDt1KG0

More about the Google API Console

In the Google API Console, you can also look up an existing key.

For more information on using the Google API Console, see API Console Help.

Restricting an API key

Google Maps APIs are available for iOS and Android apps, web browsers, and via HTTP web services. APIs in any platform can use a generic (unrestricted) API key. You can optionally add a restriction (for example, iOS apps) to the API key. Once restricted, a key will only work on platforms that support that type of restriction.

Tip: Before moving your app to production, you should secure your API key. For iOS apps, you must restrict the key to your app's bundle identifier. Learn more about keys and credentials.

To add iOS restrictions to an existing, generic API key, do the following:

  1. Go to the Credentials page of the Google API Console.
  2. Select the project that contains the API key you want to edit.
  3. On the Credentials page, from the list of API keys, select the name of the API key to edit the details of the key.
  4. In the Key restriction section of the page, select iOS apps, follow the on-screen instructions to enter your app's bundle identifier, then click Save.

Send feedback about...

Google Maps SDK for iOS
Google Maps SDK for iOS
Need help? Visit our support page.