GooglePlaces Framework Reference

  • 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:NSObject

    Objective-C

    @interfaceGMSAddressComponent:NSObject
  • Deprecated

    UseGMSPlacesClient#fetchAutocompleteSuggestionsFromRequest:callback: instead.

    Declaration

    Swift

    classGMSAutocompleteFetcher:NSObject

    Objective-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.");@end
  • This 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:NSObject

    Objective-C

    @interfaceGMSAutocompleteFilter:NSObject
  • This 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:NSObject

    Objective-C

    @interfaceGMSAutocompleteMatchFragment:NSObject
  • This class represents a place suggestion of a full query based on a partially typed string.

    Declaration

    Swift

    classGMSAutocompletePlaceSuggestion:NSObject

    Objective-C

    @interfaceGMSAutocompletePlaceSuggestion:NSObject
  • Deprecated

    UseGMSAutocompleteSuggestion instead.

    This class represents a prediction of a full query based on a partially typed string.

    Declaration

    Swift

    classGMSAutocompletePrediction:NSObject

    Objective-C

    @interfaceGMSAutocompletePrediction:NSObject
  • The request for autocomplete data.

    Declaration

    Swift

    classGMSAutocompleteRequest:NSObject

    Objective-C

    @interfaceGMSAutocompleteRequest:NSObject
  • Deprecated

    Use theplaceAutocomplete View extension in Places Swift SDK (https://developers.google.com/maps/documentation/places/ios-sdk/google-places-swift) instead.

    GMSAutocompleteResultsViewController provides 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 ofGMSAutocompleteResultsViewController to UISearchController’s initWithSearchResultsController method, then set the controller as the UISearchController’s searchResultsUpdater property.

    Use theGMSAutocompleteResultsViewControllerDelegate delegate protocol to be notified when a place is selected from the list.

    Declaration

    Swift

    classGMSAutocompleteResultsViewController:UIViewController,UISearchResultsUpdating

    Objective-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:NSObject

    Objective-C

    @interfaceGMSAutocompleteSessionToken:NSObject
  • This class represents a suggestion of a full query based on a partially typed string.

    Declaration

    Swift

    classGMSAutocompleteSuggestion:NSObject

    Objective-C

    @interfaceGMSAutocompleteSuggestion:NSObject
  • Deprecated

    Use Places Swift SDK’s (https://developers.google.com/maps/documentation/places/ios-sdk/google-places-swift) placeAutocomplete API instead.

    GMSAutocompleteTableDataSource provides an interface for providing place autocomplete predictions to populate a UITableView by implementing the UITableViewDataSource and UITableViewDelegate protocols.

    GMSAutocompleteTableDataSource is designed to be used as the data source for a UISearchDisplayController.

    NOTE:UISearchDisplayController has been deprecated since iOS 8. It is now recommended to use UISearchController withGMSAutocompleteResultsViewController to display autocomplete results using the iOS search UI.

    Set an instance ofGMSAutocompleteTableDataSource as the searchResultsDataSource and searchResultsDelegate properties ofUISearchDisplayController. In your implementation ofshouldReloadTableForSearchString, callsourceTextHasChanged with the current search string.

    Use theGMSAutocompleteTableDataSourceDelegate delegate protocol to be notified when a place is selected from the list. Because autocomplete predictions load asynchronously, it is necessary to implementdidUpdateAutocompletePredictions and call reloadData on theUISearchDisplayController‘s table view.

    Declaration

    Swift

    classGMSAutocompleteTableDataSource:NSObject,UITableViewDataSource,UITableViewDelegate

    Objective-C

    @interfaceGMSAutocompleteTableDataSource:NSObject<UITableViewDataSource,UITableViewDelegate>
  • Deprecated

    Use theplaceAutocomplete View extension in Places Swift SDK (https://developers.google.com/maps/documentation/places/ios-sdk/google-places-swift) instead.

    GMSAutocompleteViewController provides 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 theGMSAutocompleteViewControllerResultsDelegate protocol.

    To useGMSAutocompleteViewController, set its delegate to an object in your app that conforms to theGMSAutocompleteViewControllerDelegate protocol and present the controller (eg using presentViewController). TheGMSAutocompleteViewControllerDelegate delegate methods can be used to determine when the user has selected a place or has cancelled selection.

    Declaration

    Swift

    classGMSAutocompleteViewController:UIViewController

    Objective-C

    @interfaceGMSAutocompleteViewController:UIViewController
  • Request object to use withGMSPlacesClient to fetch a photo.

    Declaration

    Swift

    classGMSFetchPhotoRequest:NSObject

    Objective-C

    @interfaceGMSFetchPhotoRequest:NSObject
  • Request object to use withGMSPlacesClient to fetch a place.

    Declaration

    Swift

    classGMSFetchPlaceRequest:NSObject

    Objective-C

    @interfaceGMSFetchPlaceRequest:NSObject
  • A class representing time in hours and minutes in a 24hr clock.

    Declaration

    Swift

    classGMSTime:NSObject

    Objective-C

    @interfaceGMSTime:NSObject
  • A class representing a open/close event inGMSPeriod.

    Declaration

    Swift

    classGMSEvent:NSObject

    Objective-C

    @interfaceGMSEvent:NSObject
  • A class representing a period of time where the place is operating for aGMSPlace.It contains an openGMSEvent and an optional closeGMSEvent. The close event will be nilif the period is open 24hrs.

    Declaration

    Swift

    classGMSPeriod:NSObject

    Objective-C

    @interfaceGMSPeriod:NSObject
  • A class to handle storing and accessing opening hours information forGMSPlace.

    Declaration

    Swift

    classGMSOpeningHours:NSObject

    Objective-C

    @interfaceGMSOpeningHours:NSObject
  • Represents a particular physical place. AGMSPlace encapsulates information about a physicallocation, including its name, location, and any other information we might have about it. Thisclass is immutable.

    Declaration

    Swift

    classGMSPlace:NSObject

    Objective-C

    @interfaceGMSPlace:NSObject
  • A class representing an author attribution.

    Declaration

    Swift

    classGMSPlaceAuthorAttribution:NSObject

    Objective-C

    @interfaceGMSPlaceAuthorAttribution:NSObject
  • A class that represents an EV charging connector aggregation.

    Declaration

    Swift

    classGMSPlaceConnectorAggregation:NSObject

    Objective-C

    @interfaceGMSPlaceConnectorAggregation:NSObject
  • The consumer alert message for the place when we detect suspicious review activity on a businessor a business violates our policies.

    Declaration

    Swift

    classGMSPlaceConsumerAlert:NSObject

    Objective-C

    @interfaceGMSPlaceConsumerAlert:NSObject
  • The details of the consumer alert message.

    Declaration

    Swift

    classGMSPlaceConsumerAlertDetails:NSObject

    Objective-C

    @interfaceGMSPlaceConsumerAlertDetails:NSObject
  • A class that represents a content block.

    Declaration

    Swift

    classGMSPlaceContentBlock:NSObject

    Objective-C

    @interfaceGMSPlaceContentBlock:NSObject
  • The summary of amenities near the EV charging station. This only applies to places with type“electric_vehicle_charging_station”.

    Declaration

    Swift

    classGMSPlaceEVChargeAmenitySummary:NSObject,GMSPlaceAISummary

    Objective-C

    @interfaceGMSPlaceEVChargeAmenitySummary:NSObject<GMSPlaceAISummary>
  • A class that represents a place’s EV charging options.

    Declaration

    Swift

    classGMSPlaceEVChargeOptions:NSObject

    Objective-C

    @interfaceGMSPlaceEVChargeOptions:NSObject
  • A class that represents a place’s generative summary.

    Declaration

    Swift

    classGMSPlaceGenerativeSummary:NSObject,GMSPlaceAISummary

    Objective-C

    @interfaceGMSPlaceGenerativeSummary:NSObject<GMSPlaceAISummary>
  • Represents an is open request definition to be sent viaGMSPlacesClient.

    Declaration

    Swift

    classGMSPlaceIsOpenRequest:NSObject

    Objective-C

    @interfaceGMSPlaceIsOpenRequest:NSObject
  • The response object for theisOpenWithRequest:callback: method.

    Declaration

    Swift

    classGMSPlaceIsOpenResponse:NSObject

    Objective-C

    @interfaceGMSPlaceIsOpenResponse:NSObject
  • Represents aGMSPlace and 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,NSCopying

    Objective-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:NSObject

    Objective-C

    @interfaceGMSPlaceLikelihoodList:NSObject
  • A class that represents a summary of a neighborhood.

    Declaration

    Swift

    classGMSPlaceNeighborhoodSummary:NSObject,GMSPlaceAISummary

    Objective-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:NSObject

    Objective-C

    @interfaceGMSPlacePagination:NSObject
  • This class represents the parking options for a place.

    Declaration

    Swift

    classGMSPlaceParkingOptions:NSObject

    Objective-C

    @interfaceGMSPlaceParkingOptions:NSObject
  • The metadata corresponding to a single photo associated with a place.

    Declaration

    Swift

    classGMSPlacePhotoMetadata:NSObject

    Objective-C

    @interfaceGMSPlacePhotoMetadata:NSObject
  • A list ofGMSPlacePhotoMetadata objects.

    Declaration

    Swift

    classGMSPlacePhotoMetadataList:NSObject

    Objective-C

    @interfaceGMSPlacePhotoMetadataList:NSObject
  • This class represents a single place review.

    Declaration

    Swift

    classGMSPlaceReview:NSObject

    Objective-C

    @interfaceGMSPlaceReview:NSObject
  • AI-generated summary of the place using user reviews.

    Declaration

    Swift

    classGMSPlaceReviewSummary:NSObject,GMSPlaceAISummary

    Objective-C

    @interfaceGMSPlaceReviewSummary:NSObject<GMSPlaceAISummary>
  • Represents a text search request definition to be sent viaGMSPlacesClient.

    Declaration

    Swift

    classGMSPlaceSearchByTextRequest:NSObject

    Objective-C

    @interfaceGMSPlaceSearchByTextRequest:NSObject
  • The response object for thesearchByText method.

    Declaration

    Swift

    classGMSPlaceSearchByTextResponse:NSObject,GMSPlaceSearchResponse

    Objective-C

    @interfaceGMSPlaceSearchByTextResponse:NSObject<GMSPlaceSearchResponse>
  • Request object to use withGMSPlacesClient to fetch nearby places.

    Declaration

    Swift

    classGMSPlaceSearchNearbyRequest:NSObject

    Objective-C

    @interfaceGMSPlaceSearchNearbyRequest:NSObject
  • The response object for thesearchNearby method.

    Declaration

    Swift

    classGMSPlaceSearchNearbyResponse:NSObject,GMSPlaceSearchResponse

    Objective-C

    @interfaceGMSPlaceSearchNearbyResponse:NSObject<GMSPlaceSearchResponse>
  • Represents information on a particular day which may have opening hours different than normal.

    Declaration

    Swift

    classGMSPlaceSpecialDay:NSObject

    Objective-C

    @interfaceGMSPlaceSpecialDay:NSObject
  • GMSPlaceViewportInfo represents a rectangular bounding box on the Earth’s surface.GMSPlaceViewportInfo is immutable and can’t be modified after construction.

    Declaration

    Swift

    classGMSPlaceViewportInfo:NSObject

    Objective-C

    @interfaceGMSPlaceViewportInfo:NSObject
  • Main interface to the Places SDK. Used for searching and getting details about places. This class should be accessed through the[GMSPlacesClient sharedClient] method.

    GMSPlacesClient methods 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:NSObject

    Objective-C

    @interfaceGMSPlacesClient:NSObject
  • A class containing the Plus codes representation for a location. Seehttps://plus.codes/ for moredetails.

    Declaration

    Swift

    classGMSPlusCode:NSObject

    Objective-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.