Places SDK for iOS quick reference

The Places SDK for iOS lets iOS apps get information about places (businesses, points of interest, geographic locations) through Place Details, Place Photos, Text Search, Nearby Search, and Autocomplete. Places API (New) is the current version of the SDK.

Places SDK for iOS: key facts

  • Product: Places SDK for iOS
  • Also known as: Places SDK for iOS (New)
  • Category: Places
  • Platform: iOS
  • Runs on: Client (app or browser code)
  • Launch stage: GA
  • Lifecycle: Active
  • Overview: Places SDK for iOS overview

Places SDK for iOS: when to use it

Use Places SDK for iOS when:

  • You need place details, photos, Text Search, or Nearby Search results inside a native iOS app.
  • You need place name or address autocomplete as users type in an iOS app.
  • You want prebuilt Places UI Kit components (place details, search, autocomplete) in an iOS app.

Don't use Places SDK for iOS when:

Places SDK for iOS: setup

Official Places SDK for iOS packages:

  • swift_package: https://github.com/googlemaps/ios-places-sdk (GooglePlaces, GooglePlacesSwift)

Places SDK for iOS: common mistakes

  • Problem: Places SDK for iOS (New) calls fail if Places API (New) isn't enabled in the Cloud project or isn't on the API key's list of authorized APIs. Fix: Enable Places API (New) and add it to the API key restrictions used by the app. See /maps/documentation/places/ios-sdk/legacy/migrate-overview.
  • Problem: kGMSPlacesRateLimitExceeded (-7) means the API key exceeded its usage rate limit; apps on turned-off SDK 2.x versions (turned off July 29, 2019) also receive this error. Fix: Check quota and usage for Places API (New) in the Google Cloud console, and update apps on SDK versions earlier than 3.0. See /maps/documentation/places/ios-sdk/reference/objc/Enums/GMSPlacesErrorCode.
  • Problem: Session tokens reused across apps in the same project, or across sessions, break autocomplete session billing grouping. Fix: Generate a unique session token (version 4 UUID recommended) per autocomplete session; tokens must be unique per project. See /maps/documentation/places/ios-sdk/use-session-tokens.
  • Problem: Apps display place data without the attributions returned by the API. Fix: Show all relevant attributions returned with Places data, per the policies page. See /maps/documentation/places/ios-sdk/overview.

Places SDK for iOS: legacy and deprecated features

  • Places SDK for iOS (legacy version): Legacy since 2025-03-01. Replacement: Places SDK for iOS (New) (requires Places API (New)). Symptom: Legacy classes and methods (for example fetchPlaceFromPlaceID, GMSAutocompleteFetcher, and GMSAutocompleteViewController) don't exist in SDK 11.0.0 and later, breaking compilation. See the migration guide.
  • GMSAutocompleteResultsViewController setAutocompleteBoundsUsingNorthEastCorner:SouthWestCorner and GMSAutocompleteFetcher initWithBounds:filter: Decommissioned since 2020-10-13. Replacement: GMSAutocompleteFilter (locationBias or locationRestriction) on GMSAutocompleteRequest with GMSPlacesClient fetchAutocompleteSuggestionsFromRequest:callback:, or the GooglePlacesSwift placeAutocomplete or basicPlaceAutocomplete modifiers for a UI widget. Symptom: Methods don't exist in SDK 4.0.0 and later (and GMSAutocompleteResultsViewController and GMSAutocompleteFetcher were removed in SDK 11.0.0). See the migration guide.
  • GMSCoordinateBounds-based autocomplete bounds (GMSAutocompleteViewController.autocompleteBounds/autocompleteBoundsMode; bounds/boundsMode params of findAutocompletePredictionsFromQuery and autocompleteQuery): Decommissioned since 2020-10-13. Replacement: GMSAutocompleteRequest with GMSAutocompleteFilter (locationBias or locationRestriction) and GMSPlacesClient fetchAutocompleteSuggestionsFromRequest:callback:, or the GooglePlacesSwift placeAutocomplete or basicPlaceAutocomplete modifiers for a UI widget. Symptom: Properties and parameters don't exist in SDK 4.0.0 and later (and GMSAutocompleteViewController and findAutocompletePredictionsFromQuery were removed in SDK 11.0.0). See the migration guide.
  • GMSPlace.openNowStatus: Decommissioned since 2020-10-13. Replacement: GMSPlacesClient isOpenWithRequest:callback: (GMSPlaceIsOpenRequest) or PlacesClient.isPlaceOpen(with:) in GooglePlacesSwift. Symptom: Property doesn't exist in SDK 4.0.0 and later. See the migration guide.
  • GMSPlaceField as NS_ENUM: Decommissioned since 2020-10-13. Replacement: GMSPlaceProperty constants with request classes such as GMSFetchPlaceRequest and GMSPlaceSearchByTextRequest, or PlaceProperty in GooglePlacesSwift. Symptom: Replaced by NS_OPTIONS in SDK 4.0.0 (GMSPlaceField as NS_OPTIONS belongs to the legacy API and doesn't exist in SDK 11.0.0 and later). See the migration guide.
  • Places SDK for iOS version 2.7.0: Decommissioned since 2019-07-29. Replacement: Current Places SDK for iOS version. Symptom: kGMSPlacesRateLimitExceeded errors.

What you can do with Places SDK for iOS

See the guides linked below for each task, or compare across products in the Capabilities Explorer.

Places SDK for iOS: Generative AI

Places SDK for iOS: Places

Places SDK for iOS: Places UI Kit

  • Apply CSS styling to a place data UI element. Note: CSS custom properties apply to Maps JavaScript API Places UI Kit elements; Places SDK for Android and Places SDK for iOS style Place UI Kit views programmatically using theme and style attributes. EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). Full requirements and FAQ: https://developers.google.com/maps/comms/eea/faq
  • Customize place data UI element styling and configurations with a UI element customization tool. Note: EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). Full requirements and FAQ: https://developers.google.com/maps/comms/eea/faq
  • Add a UI element that displays information about a specific place to a web page or mobile app. Note: EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). Full requirements and FAQ: https://developers.google.com/maps/comms/eea/faq
  • Add a UI element that displays a list of places based on a query string to a web page. Note: Supported on both web pages (Maps JavaScript API) and mobile apps (Places SDK for Android and Places SDK for iOS). EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). Full requirements and FAQ: https://developers.google.com/maps/comms/eea/faq
  • Add a UI element that displays a list of places near a specific location to a web page. Note: Supported on both web pages (Maps JavaScript API) and mobile apps (Places SDK for Android and Places SDK for iOS). EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). Full requirements and FAQ: https://developers.google.com/maps/comms/eea/faq
  • Add a basic autocomplete UI element to a web page or app that returns Google Place identifiers based on a query string. Note: EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). Full requirements and FAQ: https://developers.google.com/maps/comms/eea/faq