Type-Definitions
The following type definitions are available globally.
-
The properties represent individual information that can be requested for
GMSPlace
objects. If no request properties are set, theGMSPlace
object will be empty with no useful information.Note:
GMSPlacePropertyPhoneNumber
,GMSPlacePropertyWebsite
, andGMSPlacePropertyAddressComponents
are not supported forGMSPlaceLikelihoodList
place 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 Sendable
Objective-C
typedef NSString * const GMSPlaceProperty
-
Completion type for receiving App Check tokens. If an error occurred,
token
will be nil anderror
will contain information about the error.Declaration
Swift
typealias GMSAppCheckTokenCompletion = ( String ?, ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSAppCheckTokenCompletion )( NSString * _Nullable , NSError * _Nullable )
Parameters
token
The
NSString
that was returned.error
The error that occurred, if any.
-
Callback type for receiving place details lookups. If an error occurred,
result
will be nil anderror
will contain information about the error.See
Declaration
Swift
typealias GMSPlaceResultCallback = ( GMSPlace ?, ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSPlaceResultCallback )( GMSPlace * _Nullable , NSError * _Nullable )
Parameters
result
The
GMSPlace
that was returned.error
The error that occurred, if any.
-
Callback type for receiving place likelihood lists. If an error occurred,
likelihoodList
will be nil anderror
will contain information about the error.See
Declaration
Swift
typealias GMSPlaceLikelihoodListCallback = ( GMSPlaceLikelihoodList ?, ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSPlaceLikelihoodListCallback )( GMSPlaceLikelihoodList * _Nullable , NSError * _Nullable )
Parameters
likelihoodList
The list of place likelihoods.
error
The error that occurred, if any.
-
Callback type for receiving array of
GMSPlaceLikelihood
s. If an error occurred, the array will be nil anderror
will contain information about the error.See
GMSPlacesClient
Declaration
Swift
typealias GMSPlaceLikelihoodsCallback = ([ GMSPlaceLikelihood ]?, ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSPlaceLikelihoodsCallback )( NSArray < GMSPlaceLikelihood *> * _Nullable , NSError * _Nullable )
-
Callback type for receiving autocompletion results.
results
is an array ofGMSAutocompletePredictions
representing candidate completions of the query.See
Declaration
Swift
typealias GMSAutocompletePredictionsCallback = ([ GMSAutocompletePrediction ]?, ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSAutocompletePredictionsCallback )( NSArray < GMSAutocompletePrediction *> * _Nullable , NSError * _Nullable )
Parameters
results
An array of
GMSAutocompletePrediction
s.error
The error that occurred, if any.
-
Callback type for receiving place photos results. If an error occurred,
photos
will be nil anderror
will contain information about the error.See
Declaration
Swift
typealias GMSPlacePhotoMetadataResultCallback = ( GMSPlacePhotoMetadataList ?, ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSPlacePhotoMetadataResultCallback )( GMSPlacePhotoMetadataList * _Nullable , NSError * _Nullable )
Parameters
photos
The result containing
GMSPlacePhotoMetadata
objects.error
The error that occurred, if any.
-
Callback type for receiving
UIImage
objects from aGMSPlacePhotoMetadata
object. If an error occurred,photo
will be nil anderror
will contain information about the error.See
Declaration
Swift
typealias GMSPlacePhotoImageResultCallback = ( UIImage ?, ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSPlacePhotoImageResultCallback )( UIImage * _Nullable , NSError * _Nullable )
Parameters
photo
The
UIImage
which was loaded.error
The error that occurred, if any.
-
Callback type for receiving the opening hours status for the Place. If an error occurred,
result
will beGMSPlaceOpenStatusUnknown
anderror
will contain information about the error.See
Declaration
Swift
typealias GMSPlaceOpenStatusCallback = ( GMSPlaceOpenStatus , ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSPlaceOpenStatusCallback )( GMSPlaceOpenStatus , NSError * _Nullable )
Parameters
result
The
GMSPlaceOpenStatus
that was returned.error
The error that occurred, if any.
-
Callback type for receiving the open status response. If an error occurred, response will be have a status of
GMSPlaceOpenStatusUnknown
and error will contain information about the error.See
Declaration
Swift
typealias GMSPlaceOpenStatusResponseCallback = ( GMSPlaceIsOpenResponse , ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSPlaceOpenStatusResponseCallback )( GMSPlaceIsOpenResponse * _Nonnull , NSError * _Nullable )
Parameters
response
The
GMSPlaceIsOpenResponse
that was returned.error
The error that occurred, if any.
-
Callback type for receiving search by text results.
results
is an array ofGMSPlace
representing individual results matching the query.See
Declaration
Swift
typealias GMSPlaceSearchByTextResultCallback = ([ GMSPlace ]?, ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSPlaceSearchByTextResultCallback )( NSArray < GMSPlace *> * _Nullable , NSError * _Nullable )
Parameters
results
An array of
GMSPlace
s.error
The error that occurred, if any.
-
Callback type for receiving a photo.
photoImage
is aUIImage
representing the resulting photo matching the specified request. If an error occurred,photoImage
will be nil anderror
will contain information about the error.See
Declaration
Swift
typealias GMSFetchPhotoResultCallback = ( UIImage ?, ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSFetchPhotoResultCallback )( UIImage * _Nullable , NSError * _Nullable )
Parameters
photoImage
A
UIImage
result. -
Callback type for autocomplete results.
See
Declaration
Swift
typealias GMSAutocompleteSuggestionsCallback = ([ GMSAutocompleteSuggestion ]?, ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSAutocompleteSuggestionsCallback )( NSArray < GMSAutocompleteSuggestion *> * _Nullable , NSError * _Nullable )
Parameters
results
An array of
GMSAutocompleteSuggestion
.error
The error that occurred, if any.
-
Callback type for receiving search nearby results.
See
Declaration
Swift
typealias GMSPlaceSearchNearbyResultCallback = ([ GMSPlace ]?, ( any Error )?) -> Void
Objective-C
typedef void ( ^ GMSPlaceSearchNearbyResultCallback )( NSArray < GMSPlace *> * _Nullable , NSError * _Nullable )
Parameters
places
An array of
GMSPlace
error
The error that occurred, if any.