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. DeclarationSwift class GMSAddressComponent : NSObjectObjective-C @interface GMSAddressComponent : NSObject
- 
                  
                  Deprecated Use GMSPlacesClient#fetchAutocompleteSuggestionsFromRequest:callback:instead.DeclarationSwift class GMSAutocompleteFetcher : NSObjectObjective-C @interface GMSAutocompleteFetcher : NSObject /** * Initialize the fetcher. * * @param filter The filter to apply to the results. This parameter may be nil. */ - (instancetype)initWithFilter:(nullable GMSAutocompleteFilter *)filter NS_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:(nullable GMSAutocompleteSessionToken *)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:(nullable NSString *)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. This allows customization of autocomplete suggestions to only those places that are of interest. DeclarationSwift class GMSAutocompleteFilter : NSObjectObjective-C @interface GMSAutocompleteFilter : NSObject
- 
                  
                  This class represents a matched fragment of a string. This is a contiguous range of characters in a string, suitable for highlighting in an autocompletion UI. DeclarationSwift class GMSAutocompleteMatchFragment : NSObjectObjective-C @interface GMSAutocompleteMatchFragment : NSObject
- 
                  
                  This class represents a place suggestion of a full query based on a partially typed string. DeclarationSwift class GMSAutocompletePlaceSuggestion : NSObjectObjective-C @interface GMSAutocompletePlaceSuggestion : NSObject
- 
                  
                  Deprecated Use GMSAutocompleteSuggestioninstead.This class represents a prediction of a full query based on a partially typed string. DeclarationSwift class GMSAutocompletePrediction : NSObjectObjective-C @interface GMSAutocompletePrediction : NSObject
- 
                  
                  The request for autocomplete data. DeclarationSwift class GMSAutocompleteRequest : NSObjectObjective-C @interface GMSAutocompleteRequest : NSObject
- 
                  
                  Deprecated 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.DeclarationSwift class GMSAutocompleteResultsViewController : UIViewController, UISearchResultsUpdatingObjective-C @interface GMSAutocompleteResultsViewController : UIViewController <UISearchResultsUpdating>
- 
                  
                  This class represents a session token to uniquely identify a series of queries to the Google Places API Services for fetching place predictions for a partial search string. DeclarationSwift class GMSAutocompleteSessionToken : NSObjectObjective-C @interface GMSAutocompleteSessionToken : NSObject
- 
                  
                  This class represents a suggestion of a full query based on a partially typed string. DeclarationSwift class GMSAutocompleteSuggestion : NSObjectObjective-C @interface GMSAutocompleteSuggestion : NSObject
- 
                  
                  Deprecated 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.DeclarationSwift class GMSAutocompleteTableDataSource : NSObject, UITableViewDataSource, UITableViewDelegateObjective-C @interface GMSAutocompleteTableDataSource : 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.DeclarationSwift class GMSAutocompleteViewController : UIViewControllerObjective-C @interface GMSAutocompleteViewController : UIViewController
- 
                  
                  Request object to use with GMSPlacesClientto fetch a photo.DeclarationSwift class GMSFetchPhotoRequest : NSObjectObjective-C @interface GMSFetchPhotoRequest : NSObject
- 
                  
                  Request object to use with GMSPlacesClientto fetch a place.DeclarationSwift class GMSFetchPlaceRequest : NSObjectObjective-C @interface GMSFetchPlaceRequest : NSObject
- 
                  
                  A class representing time in hours and minutes in a 24hr clock. DeclarationSwift class GMSTime : NSObjectObjective-C @interface GMSTime : NSObject
- 
                  
                  A class representing a open/close event in GMSPeriod.DeclarationSwift class GMSEvent : NSObjectObjective-C @interface GMSEvent : NSObject
- 
                  
                  A class to handle storing and accessing opening hours information for GMSPlace.DeclarationSwift class GMSOpeningHours : NSObjectObjective-C @interface GMSOpeningHours : NSObject
- 
                  
                  Represents a particular physical place. A GMSPlaceencapsulates information about a physical location, including its name, location, and any other information we might have about it. This class is immutable.DeclarationSwift class GMSPlace : NSObjectObjective-C @interface GMSPlace : NSObject
- 
                  
                  A class representing an author attribution. DeclarationSwift class GMSPlaceAuthorAttribution : NSObjectObjective-C @interface GMSPlaceAuthorAttribution : NSObject
- 
                  
                  A class that represents an EV charging connector aggregation. DeclarationSwift class GMSPlaceConnectorAggregation : NSObjectObjective-C @interface GMSPlaceConnectorAggregation : NSObject
- 
                  
                  The consumer alert message for the place when we detect suspicious review activity on a business or a business violates our policies. DeclarationSwift class GMSPlaceConsumerAlert : NSObjectObjective-C @interface GMSPlaceConsumerAlert : NSObject
- 
                  
                  The details of the consumer alert message. DeclarationSwift class GMSPlaceConsumerAlertDetails : NSObjectObjective-C @interface GMSPlaceConsumerAlertDetails : NSObject
- 
                  
                  A class that represents a content block. DeclarationSwift class GMSPlaceContentBlock : NSObjectObjective-C @interface GMSPlaceContentBlock : NSObject
- 
                  
                  The summary of amenities near the EV charging station. This only applies to places with type “electric_vehicle_charging_station”. DeclarationSwift class GMSPlaceEVChargeAmenitySummary : NSObject, GMSPlaceAISummaryObjective-C @interface GMSPlaceEVChargeAmenitySummary : NSObject <GMSPlaceAISummary>
- 
                  
                  A class that represents a place’s EV charging options. DeclarationSwift class GMSPlaceEVChargeOptions : NSObjectObjective-C @interface GMSPlaceEVChargeOptions : NSObject
- 
                  
                  A class that represents a place’s generative summary. DeclarationSwift class GMSPlaceGenerativeSummary : NSObject, GMSPlaceAISummaryObjective-C @interface GMSPlaceGenerativeSummary : NSObject <GMSPlaceAISummary>
- 
                  
                  Represents an is open request definition to be sent via GMSPlacesClient.DeclarationSwift class GMSPlaceIsOpenRequest : NSObjectObjective-C @interface GMSPlaceIsOpenRequest : NSObject
- 
                  
                  The response object for the isOpenWithRequest:callback:method.DeclarationSwift class GMSPlaceIsOpenResponse : NSObjectObjective-C @interface GMSPlaceIsOpenResponse : NSObject
- 
                  
                  Represents a GMSPlaceand the relative likelihood of the place being the best match within the list of returned places for a single request. For more information about place likelihoods, seeGMSPlaceLikelihoodList.DeclarationSwift class GMSPlaceLikelihood : NSObject, NSCopyingObjective-C @interface GMSPlaceLikelihood : 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% likely to be PlaceA, and 35% likely to be PlaceB. The corresponding likelihood list has two members, one with likelihood 0.55 and the other with likelihood 0.35. The likelihoods are not guaranteed to be correct, and in a given place likelihood list they may not sum to 1.0. DeclarationSwift class GMSPlaceLikelihoodList : NSObjectObjective-C @interface GMSPlaceLikelihoodList : NSObject
- 
                  
                  A class that represents a summary of a neighborhood. DeclarationSwift class GMSPlaceNeighborhoodSummary : NSObject, GMSPlaceAISummaryObjective-C @interface GMSPlaceNeighborhoodSummary : NSObject <GMSPlaceAISummary>
- 
                  
                  This class represents the parking options for a place. DeclarationSwift class GMSPlaceParkingOptions : NSObjectObjective-C @interface GMSPlaceParkingOptions : NSObject
- 
                  
                  The metadata corresponding to a single photo associated with a place. DeclarationSwift class GMSPlacePhotoMetadata : NSObjectObjective-C @interface GMSPlacePhotoMetadata : NSObject
- 
                  
                  A list of GMSPlacePhotoMetadataobjects.DeclarationSwift class GMSPlacePhotoMetadataList : NSObjectObjective-C @interface GMSPlacePhotoMetadataList : NSObject
- 
                  
                  This class represents a single place review. DeclarationSwift class GMSPlaceReview : NSObjectObjective-C @interface GMSPlaceReview : NSObject
- 
                  
                  AI-generated summary of the place using user reviews. DeclarationSwift class GMSPlaceReviewSummary : NSObject, GMSPlaceAISummaryObjective-C @interface GMSPlaceReviewSummary : NSObject <GMSPlaceAISummary>
- 
                  
                  Represents a text search request definition to be sent via GMSPlacesClient.DeclarationSwift class GMSPlaceSearchByTextRequest : NSObjectObjective-C @interface GMSPlaceSearchByTextRequest : NSObject
- 
                  
                  Request object to use with GMSPlacesClientto fetch nearby places.DeclarationSwift class GMSPlaceSearchNearbyRequest : NSObjectObjective-C @interface GMSPlaceSearchNearbyRequest : NSObject
- 
                  
                  Represents information on a particular day which may have opening hours different than normal. DeclarationSwift class GMSPlaceSpecialDay : NSObjectObjective-C @interface GMSPlaceSpecialDay : NSObject
- 
                  
                  GMSPlaceViewportInforepresents a rectangular bounding box on the Earth’s surface.GMSPlaceViewportInfois immutable and can’t be modified after construction.DeclarationSwift class GMSPlaceViewportInfo : NSObjectObjective-C @interface GMSPlaceViewportInfo : 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.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.DeclarationSwift class GMSPlacesClient : NSObjectObjective-C @interface GMSPlacesClient : NSObject
- 
                  
                  A class containing the Plus codes representation for a location. See https://plus.codes/ for more details. DeclarationSwift class GMSPlusCode : NSObjectObjective-C @interface GMSPlusCode : NSObject