Carthage Installation

Install with Carthage

The Maps SDK for iOS 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:
    1. Create a new project.
    2. Select the iOS > App template.
    3. On the project options screen:
      1. Enter the Project Name.
      2. Record the value of the Bundle identifier field. You can use that value to restrict your API key below.
      3. Set the project Interface to Storyboard.
      4. Set the Language to Swift or Objective-C.
  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 along with their versions:
    binary "https://dl.google.com/geosdk/GoogleMaps.json" == 6.2.1
    Make sure to regularly run carthage outdated to detect when there is a newer version to ensure you're always on the latest. If necessary, upgrade to the latest version.
  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.