Radar
Objective-C
@interface Radar : NSObject
Swift
class Radar : NSObject
The main class used to interact with the Radar SDK.
-
Initializes the Radar SDK.
Warning
Call this method from the main thread in your
AppDelegate
class before calling any other Radar methods.Declaration
Objective-C
+ (void)initializeWithPublishableKey:(NSString *_Nonnull)publishableKey;
Swift
class func initialize(publishableKey: String)
Parameters
publishableKey
Your publishable API key.
-
Gets the version number of the Radar SDK, such as “3.5.1” or “3.5.1-beta.2”.
Declaration
Objective-C
@property (class, readonly) NSString *_Nonnull sdkVersion;
Swift
class var sdkVersion: String { get }
-
Identifies the user.
Note
Until you identify the user, Radar will automatically identify the user by
deviceId
(IDFV).Declaration
Objective-C
+ (void)setUserId:(NSString *_Nullable)userId;
Swift
class func setUserId(_ userId: String?)
Parameters
userId
A stable unique ID for the user. If
nil
, the previoususerId
will be cleared. -
Returns the current
userId
.Declaration
Objective-C
+ (NSString *_Nullable)getUserId;
Swift
class func getUserId() -> String?
Return Value
The current
userId
. -
Sets an optional description for the user, displayed in the dashboard.
Declaration
Objective-C
+ (void)setDescription:(NSString *_Nullable)description;
Swift
class func setDescription(_ description: String?)
Parameters
description
A description for the user. If
nil
, the previousdescription
will be cleared. -
Returns the current
description
.Declaration
Objective-C
+ (NSString *_Nullable)getDescription;
Swift
class func getDescription() -> String?
Return Value
The current
description
. -
Sets an optional set of custom key-value pairs for the user.
Declaration
Objective-C
+ (void)setMetadata:(NSDictionary *_Nullable)metadata;
Swift
class func setMetadata(_ metadata: [AnyHashable : Any]?)
Parameters
metadata
A set of custom key-value pairs for the user. Must have 16 or fewer keys and values of type string, boolean, or number. If
nil
, the previousmetadata
will be cleared. -
Returns the current
metadata
.Declaration
Objective-C
+ (NSDictionary *_Nullable)getMetadata;
Swift
class func getMetadata() -> [AnyHashable : Any]?
Return Value
The current
metadata
. -
Enables
adId
(IDFA) collection. Disabled by default.Declaration
Objective-C
+ (void)setAdIdEnabled:(BOOL)enabled;
Swift
class func setAdIdEnabled(_ enabled: Bool)
Parameters
enabled
A boolean indicating whether
adId
should be collected.
-
Gets the device’s current location.
Declaration
Objective-C
+ (void)getLocationWithCompletionHandler: (RadarLocationCompletionHandler _Nullable)completionHandler;
Swift
class func getLocation() async -> (RadarStatus, CLLocation?, Bool)
Parameters
completionHandler
An optional completion handler.
-
Gets the device’s current location with the desired accuracy.
Declaration
Objective-C
+ (void)getLocationWithDesiredAccuracy: (RadarTrackingOptionsDesiredAccuracy)desiredAccuracy completionHandler: (RadarLocationCompletionHandler _Nullable) completionHandler;
Swift
class func getLocation(desiredAccuracy: RadarTrackingOptionsDesiredAccuracy) async -> (RadarStatus, CLLocation?, Bool)
Parameters
desiredAccuracy
The desired accuracy.
completionHandler
An optional completion handler.
-
Tracks the user’s location once in the foreground.
Warning
Note that these calls are subject to rate limits.
Declaration
Objective-C
+ (void)trackOnceWithCompletionHandler: (RadarTrackCompletionHandler _Nullable)completionHandler;
Swift
class func trackOnce() async -> (RadarStatus, CLLocation?, [RadarEvent]?, RadarUser?)
Parameters
completionHandler
An optional completion handler.
-
Tracks the user’s location once with the desired accuracy and optionally ranges beacons in the foreground.
Warning
Note that these calls are subject to rate limits.
Declaration
Objective-C
+ (void)trackOnceWithDesiredAccuracy: (RadarTrackingOptionsDesiredAccuracy)desiredAccuracy beacons:(BOOL)beacons completionHandler: (RadarTrackCompletionHandler _Nullable)completionHandler;
Swift
class func trackOnce(desiredAccuracy: RadarTrackingOptionsDesiredAccuracy, beacons: Bool) async -> (RadarStatus, CLLocation?, [RadarEvent]?, RadarUser?)
Parameters
desiredAccuracy
The desired accuracy.
beacons
A boolean indicating whether to range beacons.
completionHandler
An optional completion handler.
-
Manually updates the user’s location.
Warning
Note that these calls are subject to rate limits.
Declaration
Objective-C
+ (void)trackOnceWithLocation:(CLLocation *_Nonnull)location completionHandler: (RadarTrackCompletionHandler _Nullable)completionHandler;
Swift
class func trackOnce(location: CLLocation) async -> (RadarStatus, CLLocation?, [RadarEvent]?, RadarUser?)
Parameters
location
A location for the user.
completionHandler
An optional completion handler.
-
Starts tracking the user’s location in the background with configurable tracking options.
Declaration
Objective-C
+ (void)startTrackingWithOptions:(nonnull RadarTrackingOptions *)options;
Swift
class func startTracking(trackingOptions options: RadarTrackingOptions)
Parameters
options
Configurable tracking options.
-
Mocks tracking the user’s location from an origin to a destination.
Declaration
Objective-C
+ (void)mockTrackingWithOrigin:(CLLocation *_Nonnull)origin destination:(CLLocation *_Nonnull)destination mode:(RadarRouteMode)mode steps:(int)steps interval:(NSTimeInterval)interval completionHandler: (RadarTrackCompletionHandler _Nullable)completionHandler;
Swift
class func mockTracking(origin: CLLocation, destination: CLLocation, mode: RadarRouteMode, steps: Int32, interval: TimeInterval) async -> (RadarStatus, CLLocation?, [RadarEvent]?, RadarUser?)
Parameters
origin
The origin.
destination
The destination.
mode
The travel mode.
steps
The number of mock location updates.
interval
The interval in seconds between each mock location update. A number between 1 and 60.
-
Stops tracking the user’s location in the background.
Declaration
Objective-C
+ (void)stopTracking;
Swift
class func stopTracking()
-
Returns a boolean indicating whether tracking has been started.
Declaration
Objective-C
+ (BOOL)isTracking;
Swift
class func isTracking() -> Bool
Return Value
A boolean indicating whether tracking has been started.
-
Returns the current tracking options.
Declaration
Objective-C
+ (nonnull RadarTrackingOptions *)getTrackingOptions;
Swift
class func getTrackingOptions() -> RadarTrackingOptions
Return Value
The current tracking options.
-
Sets a delegate for client-side delivery of events, location updates, and debug logs.
Declaration
Objective-C
+ (void)setDelegate:(nullable id<RadarDelegate>)delegate;
Parameters
delegate
A delegate for client-side delivery of events, location updates, and debug logs. If
nil
, the previous delegate will be cleared.
-
Accepts an event. Events can be accepted after user check-ins or other forms of verification. Event verifications will be used to improve the accuracy and confidence level of future events.
Declaration
Objective-C
+ (void)acceptEventId:(NSString *_Nonnull)eventId verifiedPlaceId:(NSString *_Nullable)verifiedPlaceId;
Swift
class func acceptEventId(_ eventId: String, verifiedPlaceId: String?)
Parameters
eventId
The ID of the event to accept.
verifiedPlaceId
For place entry events, the ID of the verified place. May be
nil
. -
Rejects an event. Events can be accepted after user check-ins or other forms of verification. Event verifications will be used to improve the accuracy and confidence level of future events.
Declaration
Objective-C
+ (void)rejectEventId:(NSString *_Nonnull)eventId;
Swift
class func rejectEventId(_ eventId: String)
Parameters
eventId
The ID of the event to reject.
-
Sends a custom event.
Declaration
Objective-C
+ (void)sendEvent:(nonnull NSString *)customType withMetadata:(NSDictionary *_Nullable)metadata completionHandler:(RadarSendEventCompletionHandler)completionHandler;
Swift
class func sendEvent(customType: String, metadata: [AnyHashable : Any]?) async -> (RadarStatus, CLLocation?, [RadarEvent]?, RadarUser?)
Parameters
customType
The user-defined type of the event.
metadata
The metadata associated with the event.
completionHandler
A completion handler.
-
Sends a custom event with a manually provided location.
Declaration
Objective-C
+ (void)sendEvent:(nonnull NSString *)customType withLocation:(CLLocation *_Nullable)location metadata:(NSDictionary *_Nullable)metadata completionHandler:(RadarSendEventCompletionHandler)completionHandler;
Swift
class func sendEvent(customType: String, location: CLLocation?, metadata: [AnyHashable : Any]?) async -> (RadarStatus, CLLocation?, [RadarEvent]?, RadarUser?)
Parameters
customType
The user-defined type of the event.
location
The location of the event.
metadata
The metadata associated with the event.
completionHandler
A completion handler.
-
Returns the current trip options.
Declaration
Objective-C
+ (RadarTripOptions *_Nullable)getTripOptions;
Swift
class func getTripOptions() -> RadarTripOptions?
Return Value
The current trip options.
-
Starts a trip.
Declaration
Objective-C
+ (void)startTripWithOptions:(RadarTripOptions *_Nonnull)options;
Swift
class func startTrip(options: RadarTripOptions)
Parameters
options
Configurable trip options.
-
Starts a trip.
Declaration
Objective-C
+ (void)startTripWithOptions:(RadarTripOptions *_Nonnull)options completionHandler: (RadarTripCompletionHandler _Nullable)completionHandler;
Swift
class func startTrip(options: RadarTripOptions) async -> (RadarStatus, RadarTrip?, [RadarEvent]?)
Parameters
options
Configurable trip options.
completionHandler
An optional completion handler.
-
Manually updates a trip.
Declaration
Objective-C
+ (void)updateTripWithOptions:(RadarTripOptions *_Nonnull)options status:(RadarTripStatus)status completionHandler: (RadarTripCompletionHandler _Nullable)completionHandler;
Swift
class func updateTrip(options: RadarTripOptions, status: RadarTripStatus) async -> (RadarStatus, RadarTrip?, [RadarEvent]?)
Parameters
options
Configurable trip options.
status
The trip status. To avoid updating status, pass RadarTripStatusUnknown.
completionHandler
An optional completion handler.
-
Completes a trip.
Declaration
Objective-C
+ (void)completeTrip;
Swift
class func completeTrip()
-
Completes a trip.
Declaration
Objective-C
+ (void)completeTripWithCompletionHandler: (RadarTripCompletionHandler _Nullable)completionHandler;
Swift
class func completeTrip() async -> (RadarStatus, RadarTrip?, [RadarEvent]?)
Parameters
completionHandler
An optional completion handler.
-
Cancels a trip.
Declaration
Objective-C
+ (void)cancelTrip;
Swift
class func cancelTrip()
-
Cancels a trip.
Declaration
Objective-C
+ (void)cancelTripWithCompletionHandler: (RadarTripCompletionHandler _Nullable)completionHandler;
Swift
class func cancelTrip() async -> (RadarStatus, RadarTrip?, [RadarEvent]?)
Parameters
completionHandler
An optional completion handler.
-
Gets the device’s current location, then gets context for that location without sending device or user identifiers to the server.
Declaration
Objective-C
+ (void)getContextWithCompletionHandler: (RadarContextCompletionHandler _Nonnull)completionHandler;
Swift
class func getContext() async -> (RadarStatus, CLLocation?, RadarContext?)
Parameters
completionHandler
An optional completion handler.
-
Gets context for a location without sending device or user identifiers to the server.
Declaration
Objective-C
+ (void)getContextForLocation:(CLLocation *_Nonnull)location completionHandler: (RadarContextCompletionHandler _Nonnull)completionHandler;
Swift
class func getContext(location: CLLocation) async -> (RadarStatus, CLLocation?, RadarContext?)
Parameters
location
The location.
completionHandler
An optional completion handler.
-
Gets the device’s current location, then searches for places near that location, sorted by distance.
Warning
You may specify only one of chains, categories, or groups.
Declaration
Objective-C
+ (void)searchPlacesWithRadius:(int)radius chains:(NSArray<NSString *> *_Nullable)chains categories:(NSArray<NSString *> *_Nullable)categories groups:(NSArray<NSString *> *_Nullable)groups limit:(int)limit completionHandler: (RadarSearchPlacesCompletionHandler)completionHandler;
Swift
class func searchPlaces(radius: Int32, chains: [String]?, categories: [String]?, groups: [String]?, limit: Int32) async -> (RadarStatus, CLLocation?, [RadarPlace]?)
Parameters
radius
The radius to search, in meters. A number between 100 and 10000.
chains
An array of chain slugs to filter. See https://radar.com/documentation/places/chains
categories
An array of categories to filter. See https://radar.com/documentation/places/categories
groups
An array of groups to filter. See https://radar.com/documentation/places/groups
limit
The max number of places to return. A number between 1 and 100.
completionHandler
A completion handler.
-
Gets the device’s current location, then searches for places near that location, sorted by distance.
Warning
You may specify only one of chains, categories, or groups; if chains are specified,
chainMetadata
can also be specified.Declaration
Objective-C
+ (void)searchPlacesWithRadius:(int)radius chains:(NSArray<NSString *> *_Nullable)chains chainMetadata:(NSDictionary<NSString *, NSString *> *_Nullable) chainMetadata categories:(NSArray<NSString *> *_Nullable)categories groups:(NSArray<NSString *> *_Nullable)groups limit:(int)limit completionHandler: (RadarSearchPlacesCompletionHandler)completionHandler;
Swift
class func searchPlaces(radius: Int32, chains: [String]?, chainMetadata: [String : String]?, categories: [String]?, groups: [String]?, limit: Int32) async -> (RadarStatus, CLLocation?, [RadarPlace]?)
Parameters
radius
The radius to search, in meters. A number between 100 and 10000.
chains
An array of chain slugs to filter. See https://radar.com/documentation/places/chains
chainMetadata
Optional chain metadata filters. Keys and values must be strings. See https://radar.com/documentation/places#metadata.
categories
An array of categories to filter. See https://radar.com/documentation/places/categories
groups
An array of groups to filter. See https://radar.com/documentation/places/groups
limit
The max number of places to return. A number between 1 and 100.
completionHandler
A completion handler.
-
Searches for places near a location, sorted by distance.
Warning
You may specify only one of chains, categories, or groups.
Declaration
Objective-C
+ (void)searchPlacesNear:(nonnull CLLocation *)near radius:(int)radius chains:(NSArray<NSString *> *_Nullable)chains categories:(NSArray<NSString *> *_Nullable)categories groups:(NSArray<NSString *> *_Nullable)groups limit:(int)limit completionHandler:(RadarSearchPlacesCompletionHandler)completionHandler;
Swift
class func searchPlaces(near: CLLocation, radius: Int32, chains: [String]?, categories: [String]?, groups: [String]?, limit: Int32) async -> (RadarStatus, CLLocation?, [RadarPlace]?)
Parameters
near
The location to search.
radius
The radius to search, in meters. A number between 100 and 10000.
chains
An array of chain slugs to filter. See https://radar.com/documentation/places/chains
categories
An array of categories to filter. See https://radar.com/documentation/places/categories
groups
An array of groups to filter. See https://radar.com/documentation/places/groups
limit
The max number of places to return. A number between 1 and 100.
completionHandler
A completion handler.
-
Searches for places near a location, sorted by distance.
Warning
You may specify only one of chains, categories, or groups.
Declaration
Objective-C
+ (void)searchPlacesNear:(nonnull CLLocation *)near radius:(int)radius chains:(NSArray<NSString *> *_Nullable)chains chainMetadata: (NSDictionary<NSString *, NSString *> *_Nullable)chainMetadata categories:(NSArray<NSString *> *_Nullable)categories groups:(NSArray<NSString *> *_Nullable)groups limit:(int)limit completionHandler:(RadarSearchPlacesCompletionHandler)completionHandler;
Swift
class func searchPlaces(near: CLLocation, radius: Int32, chains: [String]?, chainMetadata: [String : String]?, categories: [String]?, groups: [String]?, limit: Int32) async -> (RadarStatus, CLLocation?, [RadarPlace]?)
Parameters
near
The location to search.
radius
The radius to search, in meters. A number between 100 and 10000.
chains
An array of chain slugs to filter. See https://radar.com/documentation/places/chains
chainMetadata
Optional chain metadata filters. Keys and values must be strings. See https://radar.com/documentation/places#metadata.
categories
An array of categories to filter. See https://radar.com/documentation/places/categories
groups
An array of groups to filter. See https://radar.com/documentation/places/groups
limit
The max number of places to return. A number between 1 and 100.
completionHandler
A completion handler.
-
Gets the device’s current location, then searches for geofences near that location, sorted by distance.
Declaration
Objective-C
+ (void)searchGeofencesWithRadius:(int)radius tags:(NSArray<NSString *> *_Nullable)tags metadata:(NSDictionary *_Nullable)metadata limit:(int)limit completionHandler: (RadarSearchGeofencesCompletionHandler)completionHandler;
Swift
class func searchGeofences(radius: Int32, tags: [String]?, metadata: [AnyHashable : Any]?, limit: Int32) async -> (RadarStatus, CLLocation?, [RadarGeofence]?)
Parameters
radius
The radius to search, in meters. A number between 100 and 10000.
tags
An array of tags to filter. See https://radar.com/documentation/geofences
metadata
A dictionary of metadata to filter. See https://radar.com/documentation/geofences
limit
The max number of geofences to return. A number between 1 and 100.
completionHandler
A completion handler.
-
Searches for geofences near a location, sorted by distance.
Declaration
Objective-C
+ (void)searchGeofencesNear:(nonnull CLLocation *)near radius:(int)radius tags:(NSArray<NSString *> *_Nullable)tags metadata:(NSDictionary *_Nullable)metadata limit:(int)limit completionHandler: (RadarSearchGeofencesCompletionHandler)completionHandler;
Swift
class func searchGeofences(near: CLLocation, radius: Int32, tags: [String]?, metadata: [AnyHashable : Any]?, limit: Int32) async -> (RadarStatus, CLLocation?, [RadarGeofence]?)
Parameters
near
The location to search.
radius
The radius to search, in meters. A number between 100 and 10000.
tags
An array of tags to filter. See https://radar.com/documentation/geofences
metadata
A dictionary of metadata to filter. See https://radar.com/documentation/geofences
limit
The max number of geofences to return. A number between 1 and 100.
completionHandler
A completion handler.
-
Autocompletes partial addresses and place names, sorted by relevance.
Declaration
Objective-C
+ (void)autocompleteQuery:(NSString *_Nonnull)query near:(CLLocation *_Nullable)near layers:(NSArray<NSString *> *_Nullable)layers limit:(int)limit country:(NSString *_Nullable)country completionHandler:(RadarGeocodeCompletionHandler)completionHandler;
Swift
class func autocomplete(query: String, near: CLLocation?, layers: [String]?, limit: Int32, country: String?) async -> (RadarStatus, [RadarAddress]?)
Parameters
query
The partial address or place name to autocomplete.
near
A location for the search.
layers
Optional layer filters.
limit
The max number of addresses to return. A number between 1 and 100.
country
An optional country filter. A string, the unique 2-letter country code.
completionHandler
A completion handler.
-
Autocompletes partial addresses and place names, sorted by relevance.
Declaration
Objective-C
+ (void)autocompleteQuery:(NSString *_Nonnull)query near:(CLLocation *_Nullable)near limit:(int)limit completionHandler:(RadarGeocodeCompletionHandler)completionHandler;
Swift
class func autocomplete(query: String, near: CLLocation?, limit: Int32) async -> (RadarStatus, [RadarAddress]?)
Parameters
query
The partial address or place name to autocomplete.
near
A location for the search.
limit
The max number of addresses to return. A number between 1 and 100.
completionHandler
A completion handler.
-
Geocodes an address, converting address to coordinates.
Declaration
Objective-C
+ (void)geocodeAddress:(NSString *_Nonnull)query completionHandler:(RadarGeocodeCompletionHandler)completionHandler;
Swift
class func geocode(address query: String) async -> (RadarStatus, [RadarAddress]?)
Parameters
query
The address to geocode.
completionHandler
A completion handler.
-
Gets the device’s current location, then reverse geocodes that location, converting coordinates to address.
Declaration
Objective-C
+ (void)reverseGeocodeWithCompletionHandler: (RadarGeocodeCompletionHandler)completionHandler;
Swift
class func reverseGeocode() async -> (RadarStatus, [RadarAddress]?)
Parameters
completionHandler
A completion handler.
-
Reverse geocodes a location, converting coordinates to address.
Declaration
Objective-C
+ (void)reverseGeocodeLocation:(CLLocation *_Nonnull)location completionHandler:(RadarGeocodeCompletionHandler)completionHandler;
Swift
class func reverseGeocode(location: CLLocation) async -> (RadarStatus, [RadarAddress]?)
Parameters
location
The location to reverse geocode.
completionHandler
A completion handler.
-
Geocodes the device’s current IP address, converting IP address to partial address.
Declaration
Objective-C
+ (void)ipGeocodeWithCompletionHandler: (RadarIPGeocodeCompletionHandler)completionHandler;
Swift
class func ipGeocode() async -> (RadarStatus, RadarAddress?, Bool)
Parameters
completionHandler
A completion handler.
-
Gets the device’s current location, then calculates the travel distance and duration to a destination.
Declaration
Objective-C
+ (void)getDistanceToDestination:(CLLocation *_Nonnull)destination modes:(RadarRouteMode)modes units:(RadarRouteUnits)units completionHandler:(RadarRouteCompletionHandler)completionHandler;
Swift
class func getDistance(destination: CLLocation, modes: RadarRouteMode, units: RadarRouteUnits) async -> (RadarStatus, RadarRoutes?)
Parameters
destination
The destination.
modes
The travel modes.
units
The distance units.
completionHandler
A completion handler.
-
Calculates the travel distance and duration from an origin to a destination.
Declaration
Objective-C
+ (void)getDistanceFromOrigin:(CLLocation *_Nonnull)origin destination:(CLLocation *_Nonnull)destination modes:(RadarRouteMode)modes units:(RadarRouteUnits)units completionHandler:(RadarRouteCompletionHandler)completionHandler;
Swift
class func getDistance(origin: CLLocation, destination: CLLocation, modes: RadarRouteMode, units: RadarRouteUnits) async -> (RadarStatus, RadarRoutes?)
Parameters
origin
The origin.
destination
The destination.
modes
The travel modes.
units
The distance units.
completionHandler
A completion handler.
-
Calculates the travel distances and durations between multiple origins and destinations for up to 25 routes.
Declaration
Objective-C
+ (void)getMatrixFromOrigins:(NSArray<CLLocation *> *_Nonnull)origins destinations:(NSArray<CLLocation *> *_Nonnull)destinations mode:(RadarRouteMode)mode units:(RadarRouteUnits)units completionHandler: (RadarRouteMatrixCompletionHandler)completionHandler;
Swift
class func getMatrix(origins: [CLLocation], destinations: [CLLocation], mode: RadarRouteMode, units: RadarRouteUnits) async -> (RadarStatus, RadarRouteMatrix?)
Parameters
origins
The origins.
destinations
The destinations.
mode
The travel mode.
units
The distance units.
completionHandler
A completion handler.
-
Sets the log level for debug logs.
Declaration
Objective-C
+ (void)setLogLevel:(RadarLogLevel)level;
Swift
class func setLogLevel(_ level: RadarLogLevel)
Parameters
level
The log level.
-
Returns a display string for a status value.
Declaration
Objective-C
+ (nonnull NSString *)stringForStatus:(RadarStatus)status;
Swift
class func stringForStatus(_ status: RadarStatus) -> String
Parameters
status
A status value.
Return Value
A display string for the status value.
-
Returns a display string for a location source value.
Declaration
Objective-C
+ (nonnull NSString *)stringForLocationSource:(RadarLocationSource)source;
Swift
class func stringForLocationSource(_ source: RadarLocationSource) -> String
Parameters
source
A location source value.
Return Value
A display string for the location source value.
-
Returns a display string for a travel mode value.
Declaration
Objective-C
+ (nonnull NSString *)stringForMode:(RadarRouteMode)mode;
Swift
class func stringForMode(_ mode: RadarRouteMode) -> String
Parameters
mode
A travel mode value.
Return Value
A display string for the travel mode value.
-
Returns a display string for a trip status value.
Declaration
Objective-C
+ (nonnull NSString *)stringForTripStatus:(RadarTripStatus)status;
Swift
class func stringForTripStatus(_ status: RadarTripStatus) -> String
Parameters
status
A trip status value.
Return Value
A display string for the trip status value.
-
Returns a dictionary for a location.
Declaration
Objective-C
+ (nonnull NSDictionary *)dictionaryForLocation:(nonnull CLLocation *)location;
Swift
class func dictionaryForLocation(_ location: CLLocation) -> [AnyHashable : Any]
Parameters
location
A location.
Return Value
A dictionary for the location.