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:
- You're building a native Android app. Use Places SDK for Android instead.
- You're building a web page in the browser. Use Maps JavaScript API instead.
- You need place data from a server or backend over HTTP rather than in an iOS client. Use Places API (New) instead.
Places SDK for iOS: setup
- Service to enable:
places.googleapis.com - Authentication: API key
- Usage attribution: Call the class method
addInternalUsageAttributionIDonGMSPlacesClient(Objective-C/Swift) orPlacesClient(GooglePlacesSwift) to add a usage attribution ID; deleting the call opts out. - Get started: Set up Places SDK for iOS
- Reference: Places SDK for iOS reference
- Pricing: Places SDK for iOS usage and billing
- Policies: Places SDK for iOS policies
- Release notes: Places SDK for iOS release notes
Official Places SDK for iOS packages:
- swift_package:
https://github.com/googlemaps/ios-places-sdk (GooglePlaces, GooglePlacesSwift)
Places SDK for iOS: related products
- Often used with: Maps SDK for iOS
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, andGMSAutocompleteViewController) don't exist in SDK 11.0.0 and later, breaking compilation. See the migration guide. GMSAutocompleteResultsViewControllersetAutocompleteBoundsUsingNorthEastCorner:SouthWestCornerandGMSAutocompleteFetcherinitWithBounds:filter: Decommissioned since 2020-10-13. Replacement:GMSAutocompleteFilter(locationBiasorlocationRestriction) onGMSAutocompleteRequestwithGMSPlacesClientfetchAutocompleteSuggestionsFromRequest:callback:, or theGooglePlacesSwiftplaceAutocompleteorbasicPlaceAutocompletemodifiers for a UI widget. Symptom: Methods don't exist in SDK 4.0.0 and later (andGMSAutocompleteResultsViewControllerandGMSAutocompleteFetcherwere removed in SDK 11.0.0). See the migration guide.GMSCoordinateBounds-based autocomplete bounds (GMSAutocompleteViewController.autocompleteBounds/autocompleteBoundsMode;bounds/boundsModeparams offindAutocompletePredictionsFromQueryandautocompleteQuery): Decommissioned since 2020-10-13. Replacement:GMSAutocompleteRequestwithGMSAutocompleteFilter(locationBiasorlocationRestriction) andGMSPlacesClientfetchAutocompleteSuggestionsFromRequest:callback:, or theGooglePlacesSwiftplaceAutocompleteorbasicPlaceAutocompletemodifiers for a UI widget. Symptom: Properties and parameters don't exist in SDK 4.0.0 and later (andGMSAutocompleteViewControllerandfindAutocompletePredictionsFromQuerywere removed in SDK 11.0.0). See the migration guide.GMSPlace.openNowStatus: Decommissioned since 2020-10-13. Replacement:GMSPlacesClientisOpenWithRequest:callback:(GMSPlaceIsOpenRequest) orPlacesClient.isPlaceOpen(with:)inGooglePlacesSwift. Symptom: Property doesn't exist in SDK 4.0.0 and later. See the migration guide.GMSPlaceFieldasNS_ENUM: Decommissioned since 2020-10-13. Replacement:GMSPlacePropertyconstants with request classes such asGMSFetchPlaceRequestandGMSPlaceSearchByTextRequest, orPlacePropertyinGooglePlacesSwift. Symptom: Replaced byNS_OPTIONSin SDK 4.0.0 (GMSPlaceFieldasNS_OPTIONSbelongs 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:
kGMSPlacesRateLimitExceedederrors.
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
- Return an AI-powered summary of user reviews for a specified Google Place identifier.
- Return an AI-powered place summary of the area and amenities surrounding a specified Google Place identifier for an electric vehicle charging station.
Places SDK for iOS: Places
- Return a list of places and place details based on a query string.
- Return a list of places and place details near a specific location.
- Return autocomplete results about places based on a query string.
- Return detailed information about a specific place.
- Return photos of a specific place. Note: Display each photo's author attributions (the author's name, linked to their profile URI) with the photo. The Places policies for each platform require this, for example /maps/documentation/javascript/policies#photo-attributions and /maps/documentation/places/web-service/policies#photos-and-review.
- Resize place photos.
- Return ratings and reviews for a specific place. Note: In Places API (New) web service, Place Details is an HTTP GET request to https://places.googleapis.com/v1/places/{placeId} with X-Goog-FieldMask (for example, rating,userRatingCount,reviews); Text Search, Nearby Search, and Autocomplete use POST. On Android, pass Place.Field.RATING, USER_RATING_COUNT, and REVIEWS to PlacesClient.fetchPlace(). On iOS, pass GMSPlacePropertyRating, GMSPlacePropertyUserRatingsTotal, and GMSPlacePropertyReviews in GMSFetchPlaceRequest.
- Add an autocomplete widget to a web page or app that returns results about places based on a query string.
- Specify the data fields included in place information responses.
- Specify the place types to include in place information responses.
- Return information about the place where the user's device is currently located. Note: Legacy Current Place methods were removed in Places SDK for Android v6.0+ and Places SDK for iOS v11.0+; retrieve device coordinates from platform location services and call Nearby Search.
- Return an AI-powered overview summary for a specific place.
- Return an AI-powered area summary describing places in the area around a specific place.
- Return information about places based on a query string that are located along a predefined route.
- Return distance, travel time, and directions URI to text-search places from a set of latitude/longitude coordinates.
- Return distance, travel time, and directions URI to nearby places from a set of latitude/longitude coordinates.
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