It's the 15th anniversary of Google Maps Platform - Check out the latest news and announcements

Maps SDK for iOS v.3.10.0 BETA

This guide shows you how to install the Maps SDK for iOS v.3.10.0 BETA. Once you're set up, learn how to use the new features.

Install the Maps SDK for iOS client library

Follow these steps to add the v3.10.0 Beta Maps SDK for iOS client library to your Xcode project.

Use CocoaPods

The Maps SDK for iOS is available as a CocoaPods pod. CocoaPods is an open source dependency manager for Swift and Objective-C Cocoa projects.

If you don't already have the CocoaPods tool, install it on macOS by running the following command from the terminal. For details, see the CocoaPods Getting Started guide.

sudo gem install cocoapods

Create a Podfile for the Maps SDK for iOS and use it to install the API and its dependencies:

  1. If you don't have an Xcode project yet, create one now and save it to your local machine. (If you're new to iOS development, create a Single View Application.)
  2. Create a file named Podfile in your project directory. This file defines your project's dependencies.
  3. Edit the Podfile and add your dependencies. Here is an example which includes the dependencies you need for the Maps SDK for iOS and Places SDK for iOS (optional):
    source 'https://github.com/CocoaPods/Specs.git'
    target 'YOUR_APPLICATION_TARGET_NAME_HERE' do
      pod 'GoogleMaps', '~> 3.10.0-beta'
      pod 'GooglePlaces', '~> 3.10.0-beta'
    end
  4. Save the Podfile.
  5. Open a terminal and go to the directory containing the Podfile:

    cd <path-to-project>
  6. Run the pod install command. This will install the APIs specified in the Podfile, along with any dependencies they may have.

    pod install
  7. Close Xcode, and then open (double-click) your project's .xcworkspace file to launch Xcode. From this time onwards, you must use the .xcworkspace file to open the project.

To update the API for an existing project, follow these steps:

  1. Open a terminal and go to the project directory containing the Podfile.
  2. Run the pod update command. This will update all of the APIs specified in the Podfile to the latest version.

Use Carthage

The Maps SDK for iOS 3.10.0 BETA is available to use with Carthage, a simple, decentralized dependency manager for Swift and Objective-C Cocoa projects.

  1. Install Carthage. There are several methods, so see the Carthage README file for exact steps.
  2. If you don't have an Xcode project yet, create one now and save it to your local machine. (If you're new to iOS development, create a Single View Application.)
  3. Create a file named Cartfile in your project directory. This file defines your project's dependencies.
  4. Edit the Cartfile and add your dependencies:
    binary "https://dl.google.com/geosdk/GoogleMaps.json" ~> 3.10.0-beta1
    If you are also integrating Places (optional), add this line as well:
    binary "https://dl.google.com/geosdk/GooglePlaces.json" ~> 3.10.0-beta1
  5. Save the Cartfile.
  6. In a terminal window, go to the directory containing the Cartfile:
    cd <path-to-project>
  7. Run the carthage update command. This will install the APIs specified in the Cartfile, along with any dependencies they may have.
  8. In the Finder, in your project directory, go to the downloaded framework files under Carthage/Build/iOS.
  9. Drag the following bundles into your project: (When prompted, select Copy items if needed, please use the same version as above.)
    • GoogleMaps-x.x.x/Base/Frameworks/GoogleMapsBase.framework
    • GoogleMaps-x.x.x/Maps/Frameworks/GoogleMaps.framework
    • GoogleMaps-x.x.x/Maps/Frameworks/GoogleMapsCore.framework
    • GooglePlaces-x.x.x/Frameworks/GooglePlaces.framework

    Premium Plan customers must also include GoogleMaps-x.x.x/M4B/Frameworks/GoogleMapsM4B.framework.

  10. Right-click GoogleMaps.framework in your project, and select Show In Finder.
  11. Drag the GoogleMaps.bundle from the Resources folder into the top level directory of your Xcode project. When prompted, ensure Copy items into destination group's folder is not selected.
  12. Select your project from the Project Navigator, and choose your application's target.
  13. Open the Build Phases tab for your application’s target, and within Link Binary with Libraries, add the following frameworks:
    • Accelerate.framework
    • CoreData.framework
    • CoreGraphics.framework
    • CoreImage.framework
    • CoreLocation.framework
    • CoreTelephony.framework
    • CoreText.framework
    • GLKit.framework
    • ImageIO.framework
    • libc++.tbd
    • libz.tbd
    • OpenGLES.framework
    • QuartzCore.framework
    • SystemConfiguration.framework
    • UIKit.framework
  14. Choose your project, rather than a specific target, and open the Build Settings tab. In the Other Linker Flags section, add -ObjC. If these settings are not visible, change the filter in the Build Settings bar from Basic to All.

  15. To install the Places SDK for iOS, see Get Started with the Places SDK for iOS.

To update the API for an existing project, follow these steps:

  1. Open a terminal and go to the project directory containing the Cartfile.
  2. Run the carthage update command. This will update all of the APIs specified in the Cartfile to the latest version.

Install manually

This guide shows how to manually add the Maps SDK for iOS 3.10.0 to your project and configure your build settings in Xcode.

  1. Download the SDK source files:
    GoogleMaps-3.10.0-beta1
    Places SDK binaries.
  2. Unpack the source files.
  3. Launch Xcode and either open an existing project, or create a new project. If you're new to iOS, create a Single View Application, and disable Use Storyboards and enable Use Automatic Reference Counting.
  4. Drag the following bundles into your project: (When prompted, select Copy items if needed, please use the same version as above.)
    • GoogleMaps-x.x.x/Base/Frameworks/GoogleMapsBase.framework
    • GoogleMaps-x.x.x/Maps/Frameworks/GoogleMaps.framework
    • GoogleMaps-x.x.x/Maps/Frameworks/GoogleMapsCore.framework
    • GooglePlaces-x.x.x/Frameworks/GooglePlaces.framework

    Premium Plan customers must also include GoogleMaps-x.x.x/M4B/Frameworks/GoogleMapsM4B.framework.

  5. Right-click GoogleMaps.framework in your project, and select Show In Finder.
  6. Drag the GoogleMaps.bundle from the Resources folder into the top level directory of your Xcode project. When prompted, ensure Copy items into destination group's folder is not selected.
  7. Select your project from the Project Navigator, and choose your application's target.
  8. Open the Build Phases tab for your application’s target, and within Link Binary with Libraries, add the following frameworks:
    • Accelerate.framework
    • CoreData.framework
    • CoreGraphics.framework
    • CoreImage.framework
    • CoreLocation.framework
    • CoreTelephony.framework
    • CoreText.framework
    • GLKit.framework
    • ImageIO.framework
    • libc++.tbd
    • libz.tbd
    • OpenGLES.framework
    • QuartzCore.framework
    • SystemConfiguration.framework
    • UIKit.framework
  9. Choose your project, rather than a specific target, and open the Build Settings tab. In the Other Linker Flags section, add -ObjC. If these settings are not visible, change the filter in the Build Settings bar from Basic to All.

  10. To install the Places SDK for iOS, see Get Started with the Places SDK for iOS.

Run the samples

The Google Samples repository on GitHub includes sample apps that demonstrate the use of the Maps SDK for iOS v3.10.0 BETA.