GooglePlaces Framework Reference Stay organized with collections Save and categorize content based on your preferences.
AI-generated Key Takeaways
This documentation outlines the globally available classes within the Google Places SDK for iOS.
These classes provide functionality for tasks such as place autocomplete, place details retrieval, and photo fetching.
They enable developers to integrate place-related features into their iOS applications.
The classes handle various aspects of place information, including addresses, predictions, reviews, and opening hours.
Developers can use these classes to create rich and interactive place-based experiences in their apps.
Classes
The following classes are available globally.
Represents a component of an address, e.g., street number, postcode, city, etc.
Declaration
Swift
classGMSAddressComponent:NSObjectObjective-C
@interfaceGMSAddressComponent:NSObjectDeprecated
Use
GMSPlacesClient#fetchAutocompleteSuggestionsFromRequest:callback:instead.Declaration
Swift
classGMSAutocompleteFetcher:NSObjectObjective-C
@interfaceGMSAutocompleteFetcher:NSObject/** * Initialize the fetcher. * * @param filter The filter to apply to the results. This parameter may be nil. */-(instancetype)initWithFilter:(nullableGMSAutocompleteFilter*)filterNS_DESIGNATED_INITIALIZER__GMS_AVAILABLE_BUT_DEPRECATED_MSG("Use <code>GMSPlacesClient#fetchAutocompleteSuggestionsFromRequest:callback:</code> ""instead.");/** Delegate to be notified with autocomplete prediction results. */@property(nonatomic,weak,nullable)id<GMSAutocompleteFetcherDelegate>delegate__GMS_AVAILABLE_BUT_DEPRECATED_MSG("Use <code>GMSPlacesClient#fetchAutocompleteSuggestionsFromRequest:callback:</code> ""instead.");/** Filter to apply to autocomplete suggestions (can be nil). */@property(nonatomic,strong,nullable)GMSAutocompleteFilter*autocompleteFilter__GMS_AVAILABLE_BUT_DEPRECATED_MSG("Use <code>GMSPlacesClient#fetchAutocompleteSuggestionsFromRequest:callback:</code> ""instead.");/** Provide a `GMSAutocompleteSessionToken` for tracking the specific autocomplete query flow. */-(void)provideSessionToken:(nullableGMSAutocompleteSessionToken*)sessionToken__GMS_AVAILABLE_BUT_DEPRECATED_MSG("Use <code>GMSPlacesClient#fetchAutocompleteSuggestionsFromRequest:callback:</code> ""instead.");/** * Notify the fetcher that the source text to autocomplete has changed. * * This method should only be called from the main thread. Calling this method from another thread * will result in undefined behavior. Calls to `GMSAutocompleteFetcherDelegate` methods will also be * called on the main thread. * * This method is non-blocking. * @param text The partial text to autocomplete. */-(void)sourceTextHasChanged:(nullableNSString*)text__GMS_AVAILABLE_BUT_DEPRECATED_MSG("Use <code>GMSPlacesClient#fetchAutocompleteSuggestionsFromRequest:callback:</code> ""instead.");@endThis class represents a set of restrictions that may be applied to autocomplete requests. Thisallows customization of autocomplete suggestions to only those places that are of interest.
Declaration
Swift
classGMSAutocompleteFilter:NSObjectObjective-C
@interfaceGMSAutocompleteFilter:NSObjectThis class represents a matched fragment of a string. This is a contiguous range of charactersin a string, suitable for highlighting in an autocompletion UI.
Declaration
Swift
classGMSAutocompleteMatchFragment:NSObjectObjective-C
@interfaceGMSAutocompleteMatchFragment:NSObjectThis class represents a place suggestion of a full query based on a partially typed string.
Declaration
Swift
classGMSAutocompletePlaceSuggestion:NSObjectObjective-C
@interfaceGMSAutocompletePlaceSuggestion:NSObjectDeprecated
Use
GMSAutocompleteSuggestioninstead.This class represents a prediction of a full query based on a partially typed string.
Declaration
Swift
classGMSAutocompletePrediction:NSObjectObjective-C
@interfaceGMSAutocompletePrediction:NSObjectThe request for autocomplete data.
Declaration
Swift
classGMSAutocompleteRequest:NSObjectObjective-C
@interfaceGMSAutocompleteRequest:NSObjectDeprecated
Use the
placeAutocompleteView extension in Places Swift SDK (https://developers.google.com/maps/documentation/places/ios-sdk/google-places-swift) instead.GMSAutocompleteResultsViewControllerprovides an interface that displays place autocomplete predictions in a table view. The table view will be automatically updated as input text changes.This class is intended to be used as the search results controller of a UISearchController. Pass an instance of
GMSAutocompleteResultsViewControllerto UISearchController’s initWithSearchResultsController method, then set the controller as the UISearchController’s searchResultsUpdater property.Use the
GMSAutocompleteResultsViewControllerDelegatedelegate protocol to be notified when a place is selected from the list.Declaration
Swift
classGMSAutocompleteResultsViewController:UIViewController,UISearchResultsUpdatingObjective-C
@interfaceGMSAutocompleteResultsViewController:UIViewController<UISearchResultsUpdating>This class represents a session token to uniquely identify a series of queries to the GooglePlaces API Services for fetching place predictions for a partial search string.
Declaration
Swift
classGMSAutocompleteSessionToken:NSObjectObjective-C
@interfaceGMSAutocompleteSessionToken:NSObjectThis class represents a suggestion of a full query based on a partially typed string.
Declaration
Swift
classGMSAutocompleteSuggestion:NSObjectObjective-C
@interfaceGMSAutocompleteSuggestion:NSObjectDeprecated
Use Places Swift SDK’s (https://developers.google.com/maps/documentation/places/ios-sdk/google-places-swift) placeAutocomplete API instead.
GMSAutocompleteTableDataSourceprovides an interface for providing place autocomplete predictions to populate a UITableView by implementing the UITableViewDataSource and UITableViewDelegate protocols.GMSAutocompleteTableDataSourceis designed to be used as the data source for a UISearchDisplayController.NOTE:
UISearchDisplayControllerhas been deprecated since iOS 8. It is now recommended to use UISearchController withGMSAutocompleteResultsViewControllerto display autocomplete results using the iOS search UI.Set an instance of
GMSAutocompleteTableDataSourceas the searchResultsDataSource and searchResultsDelegate properties ofUISearchDisplayController. In your implementation ofshouldReloadTableForSearchString, callsourceTextHasChangedwith the current search string.Use the
GMSAutocompleteTableDataSourceDelegatedelegate protocol to be notified when a place is selected from the list. Because autocomplete predictions load asynchronously, it is necessary to implementdidUpdateAutocompletePredictionsand call reloadData on theUISearchDisplayController‘s table view.Declaration
Swift
classGMSAutocompleteTableDataSource:NSObject,UITableViewDataSource,UITableViewDelegateObjective-C
@interfaceGMSAutocompleteTableDataSource:NSObject<UITableViewDataSource,UITableViewDelegate>Deprecated
Use the
placeAutocompleteView extension in Places Swift SDK (https://developers.google.com/maps/documentation/places/ios-sdk/google-places-swift) instead.GMSAutocompleteViewControllerprovides an interface that displays a table of autocomplete predictions that updates as the user enters text. Place selections made by the user are returned to the app via theGMSAutocompleteViewControllerResultsDelegateprotocol.To use
GMSAutocompleteViewController, set its delegate to an object in your app that conforms to theGMSAutocompleteViewControllerDelegateprotocol and present the controller (eg using presentViewController). TheGMSAutocompleteViewControllerDelegatedelegate methods can be used to determine when the user has selected a place or has cancelled selection.Declaration
Swift
classGMSAutocompleteViewController:UIViewControllerObjective-C
@interfaceGMSAutocompleteViewController:UIViewControllerRequest object to use with
GMSPlacesClientto fetch a photo.Declaration
Swift
classGMSFetchPhotoRequest:NSObjectObjective-C
@interfaceGMSFetchPhotoRequest:NSObjectRequest object to use with
GMSPlacesClientto fetch a place.Declaration
Swift
classGMSFetchPlaceRequest:NSObjectObjective-C
@interfaceGMSFetchPlaceRequest:NSObjectA class representing time in hours and minutes in a 24hr clock.
Declaration
Swift
classGMSTime:NSObjectObjective-C
@interfaceGMSTime:NSObjectA class representing a open/close event in
GMSPeriod.Declaration
Swift
classGMSEvent:NSObjectObjective-C
@interfaceGMSEvent:NSObjectA class to handle storing and accessing opening hours information for
GMSPlace.Declaration
Swift
classGMSOpeningHours:NSObjectObjective-C
@interfaceGMSOpeningHours:NSObjectRepresents a particular physical place. A
GMSPlaceencapsulates information about a physicallocation, including its name, location, and any other information we might have about it. Thisclass is immutable.Declaration
Swift
classGMSPlace:NSObjectObjective-C
@interfaceGMSPlace:NSObjectA class representing an author attribution.
Declaration
Swift
classGMSPlaceAuthorAttribution:NSObjectObjective-C
@interfaceGMSPlaceAuthorAttribution:NSObjectA class that represents an EV charging connector aggregation.
Declaration
Swift
classGMSPlaceConnectorAggregation:NSObjectObjective-C
@interfaceGMSPlaceConnectorAggregation:NSObjectThe consumer alert message for the place when we detect suspicious review activity on a businessor a business violates our policies.
Declaration
Swift
classGMSPlaceConsumerAlert:NSObjectObjective-C
@interfaceGMSPlaceConsumerAlert:NSObjectThe details of the consumer alert message.
Declaration
Swift
classGMSPlaceConsumerAlertDetails:NSObjectObjective-C
@interfaceGMSPlaceConsumerAlertDetails:NSObjectA class that represents a content block.
Declaration
Swift
classGMSPlaceContentBlock:NSObjectObjective-C
@interfaceGMSPlaceContentBlock:NSObjectThe summary of amenities near the EV charging station. This only applies to places with type“electric_vehicle_charging_station”.
Declaration
Swift
classGMSPlaceEVChargeAmenitySummary:NSObject,GMSPlaceAISummaryObjective-C
@interfaceGMSPlaceEVChargeAmenitySummary:NSObject<GMSPlaceAISummary>A class that represents a place’s EV charging options.
Declaration
Swift
classGMSPlaceEVChargeOptions:NSObjectObjective-C
@interfaceGMSPlaceEVChargeOptions:NSObjectA class that represents a place’s generative summary.
Declaration
Swift
classGMSPlaceGenerativeSummary:NSObject,GMSPlaceAISummaryObjective-C
@interfaceGMSPlaceGenerativeSummary:NSObject<GMSPlaceAISummary>Represents an is open request definition to be sent via
GMSPlacesClient.Declaration
Swift
classGMSPlaceIsOpenRequest:NSObjectObjective-C
@interfaceGMSPlaceIsOpenRequest:NSObjectThe response object for the
isOpenWithRequest:callback:method.Declaration
Swift
classGMSPlaceIsOpenResponse:NSObjectObjective-C
@interfaceGMSPlaceIsOpenResponse:NSObjectRepresents a
GMSPlaceand the relative likelihood of the place being the best match within thelist of returned places for a single request. For more information about place likelihoods, seeGMSPlaceLikelihoodList.Declaration
Swift
classGMSPlaceLikelihood:NSObject,NSCopyingObjective-C
@interfaceGMSPlaceLikelihood:NSObject<NSCopying>Represents a list of places with an associated likelihood for the place being the correct place.For example, the Places service may be uncertain what the true Place is, but think it 55% likelyto be PlaceA, and 35% likely to be PlaceB. The corresponding likelihood list has two members, onewith likelihood 0.55 and the other with likelihood 0.35. The likelihoods are not guaranteed to becorrect, and in a given place likelihood list they may not sum to 1.0.
Declaration
Swift
classGMSPlaceLikelihoodList:NSObjectObjective-C
@interfaceGMSPlaceLikelihoodList:NSObjectA class that represents a summary of a neighborhood.
Declaration
Swift
classGMSPlaceNeighborhoodSummary:NSObject,GMSPlaceAISummaryObjective-C
@interfaceGMSPlaceNeighborhoodSummary:NSObject<GMSPlaceAISummary>Pagination object for {@link GMSPlaceSearchResponse}. There could be more than one page ofresults in a single search, use {@link fetchNextPageWithCompletion} to fetch the next page ofresults.
Declaration
Swift
classGMSPlacePagination:NSObjectObjective-C
@interfaceGMSPlacePagination:NSObjectThis class represents the parking options for a place.
Declaration
Swift
classGMSPlaceParkingOptions:NSObjectObjective-C
@interfaceGMSPlaceParkingOptions:NSObjectThe metadata corresponding to a single photo associated with a place.
Declaration
Swift
classGMSPlacePhotoMetadata:NSObjectObjective-C
@interfaceGMSPlacePhotoMetadata:NSObjectA list of
GMSPlacePhotoMetadataobjects.Declaration
Swift
classGMSPlacePhotoMetadataList:NSObjectObjective-C
@interfaceGMSPlacePhotoMetadataList:NSObjectThis class represents a single place review.
Declaration
Swift
classGMSPlaceReview:NSObjectObjective-C
@interfaceGMSPlaceReview:NSObjectAI-generated summary of the place using user reviews.
Declaration
Swift
classGMSPlaceReviewSummary:NSObject,GMSPlaceAISummaryObjective-C
@interfaceGMSPlaceReviewSummary:NSObject<GMSPlaceAISummary>Represents a text search request definition to be sent via
GMSPlacesClient.Declaration
Swift
classGMSPlaceSearchByTextRequest:NSObjectObjective-C
@interfaceGMSPlaceSearchByTextRequest:NSObjectThe response object for the
searchByTextmethod.Declaration
Swift
classGMSPlaceSearchByTextResponse:NSObject,GMSPlaceSearchResponseObjective-C
@interfaceGMSPlaceSearchByTextResponse:NSObject<GMSPlaceSearchResponse>Request object to use with
GMSPlacesClientto fetch nearby places.Declaration
Swift
classGMSPlaceSearchNearbyRequest:NSObjectObjective-C
@interfaceGMSPlaceSearchNearbyRequest:NSObjectThe response object for the
searchNearbymethod.Declaration
Swift
classGMSPlaceSearchNearbyResponse:NSObject,GMSPlaceSearchResponseObjective-C
@interfaceGMSPlaceSearchNearbyResponse:NSObject<GMSPlaceSearchResponse>Represents information on a particular day which may have opening hours different than normal.
Declaration
Swift
classGMSPlaceSpecialDay:NSObjectObjective-C
@interfaceGMSPlaceSpecialDay:NSObjectGMSPlaceViewportInforepresents a rectangular bounding box on the Earth’s surface.GMSPlaceViewportInfois immutable and can’t be modified after construction.Declaration
Swift
classGMSPlaceViewportInfo:NSObjectObjective-C
@interfaceGMSPlaceViewportInfo:NSObjectMain interface to the Places SDK. Used for searching and getting details about places. This class should be accessed through the
[GMSPlacesClient sharedClient]method.GMSPlacesClientmethods should only be called from the main thread. Calling these methods from another thread will result in an exception or undefined behavior. Unless otherwise specified, all callbacks will be invoked on the main thread.Declaration
Swift
classGMSPlacesClient:NSObjectObjective-C
@interfaceGMSPlacesClient:NSObjectA class containing the Plus codes representation for a location. Seehttps://plus.codes/ for moredetails.
Declaration
Swift
classGMSPlusCode:NSObjectObjective-C
@interfaceGMSPlusCode:NSObject
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-20 UTC.