Places SDK for iOS versions

Select platform: Android iOS JavaScript

The Google Maps Platform team regularly updates SDKs with new features, bug fixes, and performance improvements. This page provides guidance on how to manage your dependencies on mobile SDKs.

  • For mission-critical apps, link to the latest dot release of the major version that you are using (X.*), and upgrade yearly to the new major version.

    As you release new versions of your application throughout the year, you may start using newer dot versions of the Places SDK for iOS. This will not require updates in your application as new dot versions are backward compatible.

    Benefits:

    • If you discover issues in the Places SDK for iOS, fixes will be provided in a backward-compatible way for 12 months after the initial release of the major version, per the Mobile support policy. You will not need to urgently upgrade to an incompatible SDK version to benefit from fixes.
    • The latest improvements and features are easy to adopt when your app is already built on the latest version.
    • Annual incremental updates to the newest major version of the SDK may require less work to adapt, rewrite, and test your application, than having to handle backwards-incompatible changes introduced across multiple major version releases.

  • For non-critical apps, link to any fixed version. When you receive a deprecation notice for that fixed version, you will have 12 months to make your updated app code available to your users.

    Benefits:

    • Less frequent maintenance work.
    • New versions of your app keep supporting users' devices running older mobile operating systems for longer (until you need to upgrade to a new SDK version).

Project Owners with monitored email addresses receive proactive notifications about changes that impact each of their projects. Stay informed about major updates, deprecations, and other changes.

Installation

Swift Package Manager

The Places SDK for iOS can be installed via Swift Package Manager. To add the SDK, ensure you have removed any existing Places SDK for iOS dependencies.

To add the SDK to a new or existing project, follow these steps:

  1. Open your Xcode project or workspace, then go to File > Add Package Dependencies.
  2. Enter https://github.com/googlemaps/ios-places-sdk as the URL, press Enter to pull in the package, and click "Add Package".
  3. To install a specific version, set the Dependency Rule field to one of the version-based options. For new projects, we recommend specifying the latest version and using the "Exact Version" option. Once complete, click "Add Package".
  4. From the Choose Package Products window, verify that GooglePlaces, GooglePlacesSwift, or both, will be added to your designated main target. Once complete, click Add Package.

    If you are updating Google Places Swift from the deprecated GitHub URL

    Important: The GitHub URL to access Google Places Swift has changed starting with version 0.3.0. If you are updating a version of GooglePlacesSwift that was accessed through the old URL, https://github.com/googlemaps/ios-places-swift-sdk, remove it from your Xcode's package dependencies section.

  5. To verify your installation, navigate to your target's General pane. In Frameworks, Libraries, and Embedded Content, you should see the installed packages. You can also view the Package Dependencies section of Project Navigator to verify the package and its version. Xcode shows the GitHub version, which matches the version of GooglePlaces (for example 9.2.0) but does not match the version of GooglePlacesSwift (for example 0.3.0).

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

  1. From Xcode, go to "File > Packages > Update To Latest Package Versions".

    If you are updating Google Places Swift from the deprecated GitHub URL

    Important: The GitHub URL to access Google Places Swift has changed starting with version 0.3.0. If you are updating a version of GooglePlacesSwift that was accessed through the old URL, https://github.com/googlemaps/ios-places-swift-sdk, remove it from your Xcode's package dependencies section.

  2. To verify your installation, go to the Package Dependencies section of Project Navigator to verify the package and its version.

CocoaPods

Always specify a version number in your dependencies instead of using an optimistic operator (~>) since that can lead to unpredictable and unrepeatable builds. The Places SDK for iOS adheres to semantic versioning, and new major version releases include breaking changes.

An example Podfile dependency using Podfile syntax:

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '15.0'

target 'YOUR_APPLICATION_TARGET_NAME_HERE' do
  pod 'GooglePlaces', '9.2.0'
  pod 'GooglePlacesSwift', '0.3.0'
end

Maintenance and upgrade

To build with the latest improvements, regularly check for newer versions and update your version specifications. If you are updating to a new major version, check the release notes for backwards-incompatible changes and how to update your code.

Swift Package Manager

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

  1. To verify your installation, go to the Package Dependencies section of Project Navigator to verify the package and its version.

Cocoapods

  1. Open a terminal and go to the directory containing the Podfile:

    cd <path-to-project>
  2. Run pod outdated to see if a newer version of the Places SDK for iOS is available.
  3. If a newer version of the SDK is found, update your Podfile with this new version. See Specifying pod versions to learn how to set a specific version in your Podfile.
  4. Run pod update.
  5. Make any necessary changes as a result of the upgrade. See the Release Notes for a list of the changes in each release.
  6. Clean and rebuild your project by selecting Product > Clean and then Product > Build

Manual installation

Get the link to the latest source files at Installing the SDK.

In addition to polling for newer versions, Google Cloud project owners receive emails about backwards incompatible changes that may affect their projects. To get proactive notification about backwards incompatible changes, assign the owner role with a monitored email address for each of your projects.