Type-Definitions
The following type definitions are available globally.
-
The properties represent individual information that can be requested for
GMSPlaceobjects. If no request properties are set, theGMSPlaceobject will be empty with no useful information.Note:
GMSPlacePropertyPhoneNumber,GMSPlacePropertyWebsite, andGMSPlacePropertyAddressComponentsare not supported forGMSPlaceLikelihoodListplace objects. Refer to https://developers.google.com/places/ios-sdk/place-data-fields for more details.Declaration
Swift
struct GMSPlaceProperty : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked SendableObjective-C
typedef NSString *const GMSPlaceProperty -
Completion type for receiving App Check tokens. If an error occurred,
tokenwill be nil anderrorwill contain information about the error.Declaration
Swift
typealias GMSAppCheckTokenCompletion = (String?, (any Error)?) -> VoidObjective-C
typedef void (^GMSAppCheckTokenCompletion)(NSString *_Nullable, NSError *_Nullable)Parameters
tokenThe
NSStringthat was returned.errorThe error that occurred, if any.
-
Callback type for receiving place details lookups. If an error occurred,
resultwill be nil anderrorwill contain information about the error.See
Declaration
Swift
typealias GMSPlaceResultCallback = (GMSPlace?, (any Error)?) -> VoidObjective-C
typedef void (^GMSPlaceResultCallback)(GMSPlace *_Nullable, NSError *_Nullable)Parameters
resultThe
GMSPlacethat was returned.errorThe error that occurred, if any.
-
Deprecated
This method is replaced by
GMSPlaceSearchNearbyResultCallbackand will be removed in a future release.Callback type for receiving place likelihood lists. If an error occurred,
likelihoodListwill be nil anderrorwill contain information about the error.See
Declaration
Swift
typealias GMSPlaceLikelihoodListCallback = (GMSPlaceLikelihoodList?, (any Error)?) -> VoidObjective-C
typedef void (^GMSPlaceLikelihoodListCallback)( GMSPlaceLikelihoodList *_Nullable, NSError *_Nullable)Parameters
likelihoodListThe list of place likelihoods.
errorThe error that occurred, if any.
-
Deprecated
This method is replaced by
GMSPlaceSearchNearbyResultCallbackand will be removed in a future release.Callback type for receiving array of
GMSPlaceLikelihoods. If an error occurred, the array will be nil anderrorwill contain information about the error.See
GMSPlacesClientDeclaration
Swift
typealias GMSPlaceLikelihoodsCallback = ([GMSPlaceLikelihood]?, (any Error)?) -> VoidObjective-C
typedef void (^GMSPlaceLikelihoodsCallback)( NSArray<GMSPlaceLikelihood *> *_Nullable, NSError *_Nullable) -
Deprecated
This method is replaced by
GMSAutocompleteSuggestionsCallbackand will be removed in a future release.Callback type for receiving autocompletion results.
resultsis an array ofGMSAutocompletePredictionsrepresenting candidate completions of the query.See
Declaration
Swift
typealias GMSAutocompletePredictionsCallback = ([GMSAutocompletePrediction]?, (any Error)?) -> VoidObjective-C
typedef void (^GMSAutocompletePredictionsCallback)( NSArray<GMSAutocompletePrediction *> *_Nullable, NSError *_Nullable)Parameters
resultsAn array of
GMSAutocompletePredictions.errorThe error that occurred, if any.
-
Deprecated
This method is replaced by
GMSPlaceResultCallbackand will be removed in a future release.Callback type for receiving place photos results. If an error occurred,
photoswill be nil anderrorwill contain information about the error.See
Declaration
Swift
typealias GMSPlacePhotoMetadataResultCallback = (GMSPlacePhotoMetadataList?, (any Error)?) -> VoidObjective-C
typedef void (^GMSPlacePhotoMetadataResultCallback)( GMSPlacePhotoMetadataList *_Nullable, NSError *_Nullable)Parameters
photosThe result containing
GMSPlacePhotoMetadataobjects.errorThe error that occurred, if any.
-
Deprecated
This method is replaced by
GMSFetchPhotoResultCallbackand will be removed in a future release.Callback type for receiving
UIImageobjects from aGMSPlacePhotoMetadataobject. If an error occurred,photowill be nil anderrorwill contain information about the error.See
Declaration
Swift
typealias GMSPlacePhotoImageResultCallback = (UIImage?, (any Error)?) -> VoidObjective-C
typedef void (^GMSPlacePhotoImageResultCallback)(UIImage *_Nullable, NSError *_Nullable)Parameters
photoThe
UIImagewhich was loaded.errorThe error that occurred, if any.
-
Deprecated
This method is replaced by
GMSPlaceOpenStatusResponseCallbackand will be removed in a future release.Callback type for receiving the opening hours status for the Place. If an error occurred,
resultwill beGMSPlaceOpenStatusUnknownanderrorwill contain information about the error.See
Declaration
Swift
typealias GMSPlaceOpenStatusCallback = (GMSPlaceOpenStatus, (any Error)?) -> VoidObjective-C
typedef void (^GMSPlaceOpenStatusCallback)(GMSPlaceOpenStatus, NSError *_Nullable)Parameters
resultThe
GMSPlaceOpenStatusthat was returned.errorThe error that occurred, if any.
-
Callback type for receiving the open status response. If an error occurred, response will be have a status of
GMSPlaceOpenStatusUnknownand error will contain information about the error.See
Declaration
Swift
typealias GMSPlaceOpenStatusResponseCallback = (GMSPlaceIsOpenResponse, (any Error)?) -> VoidObjective-C
typedef void (^GMSPlaceOpenStatusResponseCallback)( GMSPlaceIsOpenResponse *_Nonnull, NSError *_Nullable)Parameters
responseThe
GMSPlaceIsOpenResponsethat was returned.errorThe error that occurred, if any.
-
Callback type for receiving search by text results.
resultsis an array ofGMSPlacerepresenting individual results matching the query.See
Declaration
Swift
typealias GMSPlaceSearchByTextResultCallback = ([GMSPlace]?, (any Error)?) -> VoidObjective-C
typedef void (^GMSPlaceSearchByTextResultCallback)( NSArray<GMSPlace *> *_Nullable, NSError *_Nullable)Parameters
resultsAn array of
GMSPlaces.errorThe error that occurred, if any.
-
Callback type for receiving a photo.
photoImageis aUIImagerepresenting the resulting photo matching the specified request. If an error occurred,photoImagewill be nil anderrorwill contain information about the error.See
Declaration
Swift
typealias GMSFetchPhotoResultCallback = (UIImage?, (any Error)?) -> VoidObjective-C
typedef void (^GMSFetchPhotoResultCallback)(UIImage *_Nullable, NSError *_Nullable)Parameters
photoImageA
UIImageresult. -
Callback type for autocomplete results.
See
Declaration
Swift
typealias GMSAutocompleteSuggestionsCallback = ([GMSAutocompleteSuggestion]?, (any Error)?) -> VoidObjective-C
typedef void (^GMSAutocompleteSuggestionsCallback)( NSArray<GMSAutocompleteSuggestion *> *_Nullable, NSError *_Nullable)Parameters
resultsAn array of
GMSAutocompleteSuggestion.errorThe error that occurred, if any.
-
Callback type for receiving search nearby results.
See
Declaration
Swift
typealias GMSPlaceSearchNearbyResultCallback = ([GMSPlace]?, (any Error)?) -> VoidObjective-C
typedef void (^GMSPlaceSearchNearbyResultCallback)( NSArray<GMSPlace *> *_Nullable, NSError *_Nullable)Parameters
placesAn array of
GMSPlaceerrorThe error that occurred, if any.