AI-generated Key Takeaways
-
This documentation details protocols available globally for the Places SDK for iOS.
-
These protocols enable communication between various Places SDK classes and the application.
-
They facilitate tasks such as autocomplete, place selection, and location biasing/restriction.
-
The protocols define delegate methods for handling user interactions and receiving results.
-
Developers can implement these protocols to customize the behavior of Places SDK features.
Protocols
The following protocols are available globally.
-
Deprecated
Use
GMSPlacesClient#fetchAutocompleteSuggestionsFromRequest:callback:
instead.Declaration
Swift
protocol GMSAutocompleteFetcherDelegate : NSObjectProtocol
Objective-C
@protocol GMSAutocompleteFetcherDelegate <NSObject> @required /** * Called when autocomplete predictions are available. * * @param predictions an array of `GMSAutocompletePrediction` objects. */ - (void)didAutocompleteWithPredictions:(NSArray<GMSAutocompletePrediction *> *)predictions __GMS_AVAILABLE_BUT_DEPRECATED_MSG( "Use <code>GMSPlacesClient#fetchAutocompleteSuggestionsFromRequest:callback:</code> " "instead.") ; /** * Called when an autocomplete request returns an error. * * @param error the error that was received. */ - (void)didFailAutocompleteWithError:(NSError *)error __GMS_AVAILABLE_BUT_DEPRECATED_MSG( "Use <code>GMSPlacesClient#fetchAutocompleteSuggestionsFromRequest:callback:</code> " "instead.") ; @end
-
Deprecated
Use the
placeAutocomplete
View extension in Places Swift SDK (https://developers.google.com/maps/documentation/places/ios-sdk/google-places-swift) instead.Protocol used by
GMSAutocompleteResultsViewController
, to communicate the user’s interaction with the controller to the application.Declaration
Swift
protocol GMSAutocompleteResultsViewControllerDelegate : NSObjectProtocol
Objective-C
@protocol GMSAutocompleteResultsViewControllerDelegate <NSObject>
-
Deprecated
Use the
placeAutocomplete
View extension in Places Swift SDK (https://developers.google.com/maps/documentation/places/ios-sdk/google-places-swift) instead.Protocol used by
GMSAutocompleteTableDataSource
, to communicate the user’s interaction with the data source to the application.Declaration
Swift
protocol GMSAutocompleteTableDataSourceDelegate : NSObjectProtocol
Objective-C
@protocol GMSAutocompleteTableDataSourceDelegate <NSObject>
-
Deprecated
Use the
placeAutocomplete
View extension in Places Swift SDK (https://developers.google.com/maps/documentation/places/ios-sdk/google-places-swift) instead.Protocol used by
GMSAutocompleteViewController
, to communicate the user’s interaction with the controller to the application.Declaration
Swift
protocol GMSAutocompleteViewControllerDelegate : NSObjectProtocol
Objective-C
@protocol GMSAutocompleteViewControllerDelegate <NSObject>
-
Protocol for the AI-generated summary of the place.
Declaration
Swift
protocol GMSPlaceAISummary : NSObjectProtocol
Objective-C
@protocol GMSPlaceAISummary <NSObject>
-
Protocol for specifying that the location can be used as search bias.
Declaration
Swift
protocol GMSPlaceLocationBias : NSCopying, NSObjectProtocol
Objective-C
@protocol GMSPlaceLocationBias <NSObject, NSCopying>
-
Protocol for specifying that the location can be used as search restriction.
Declaration
Swift
protocol GMSPlaceLocationRestriction : NSCopying, NSObjectProtocol
Objective-C
@protocol GMSPlaceLocationRestriction <NSObject, NSCopying>
-
Protocol for providing App Check tokens for Places SDK.
Declaration
Swift
protocol GMSPlacesAppCheckTokenProvider : NSObjectProtocol
Objective-C
@protocol GMSPlacesAppCheckTokenProvider <NSObject>