Type Definitions
The following type definitions are available globally.
-
Called when a location request succeeds, fails, or times out.
Receives the request status and, if successful, the location.
Declaration
Objective-C
typedef void (^_Nullable RadarLocationCompletionHandler)(RadarStatus, CLLocation *_Nullable, BOOL)
Swift
typealias RadarLocationCompletionHandler = (RadarStatus, CLLocation?, Bool) -> Void
-
Called when a beacon ranging request succeeds, fails, or times out.
Receives the request status and, if successful, the nearby beacons.
Declaration
Objective-C
typedef void (^_Nullable RadarBeaconCompletionHandler)( RadarStatus, NSArray<RadarBeacon *> *_Nullable)
Swift
typealias RadarBeaconCompletionHandler = (RadarStatus, [RadarBeacon]?) -> Void
-
Called when a track request succeeds, fails, or times out.
Receives the request status and, if successful, the user’s location, an array of the events generated, and the user.
Declaration
Objective-C
typedef void (^_Nullable RadarTrackCompletionHandler)( RadarStatus, CLLocation *_Nullable, NSArray<RadarEvent *> *_Nullable, RadarUser *_Nullable)
Swift
typealias RadarTrackCompletionHandler = (RadarStatus, CLLocation?, [RadarEvent]?, RadarUser?) -> Void
-
Called when a trip update succeeds, fails, or times out.
Receives the request status and, if successful, the trip and an array of the events generated.
Declaration
Objective-C
typedef void (^_Nullable RadarTripCompletionHandler)( RadarStatus, RadarTrip *_Nullable, NSArray<RadarEvent *> *_Nullable)
Swift
typealias RadarTripCompletionHandler = (RadarStatus, RadarTrip?, [RadarEvent]?) -> Void
-
Called when a context request succeeds, fails, or times out.
Receives the request status and, if successful, the location and the context.
Declaration
Objective-C
typedef void (^_Nonnull RadarContextCompletionHandler)(RadarStatus, CLLocation *_Nullable, RadarContext *_Nullable)
Swift
typealias RadarContextCompletionHandler = (RadarStatus, CLLocation?, RadarContext?) -> Void
-
Called when a place search request succeeds, fails, or times out.
Receives the request status and, if successful, the location and an array of places sorted by distance.
Declaration
Objective-C
typedef void (^_Nonnull RadarSearchPlacesCompletionHandler)( RadarStatus, CLLocation *_Nullable, NSArray<RadarPlace *> *_Nullable)
Swift
typealias RadarSearchPlacesCompletionHandler = (RadarStatus, CLLocation?, [RadarPlace]?) -> Void
-
Called when a geofence search request succeeds, fails, or times out.
Receives the request status and, if successful, the location and an array of geofences sorted by distance.
Declaration
Objective-C
typedef void (^_Nonnull RadarSearchGeofencesCompletionHandler)( RadarStatus, CLLocation *_Nullable, NSArray<RadarGeofence *> *_Nullable)
Swift
typealias RadarSearchGeofencesCompletionHandler = (RadarStatus, CLLocation?, [RadarGeofence]?) -> Void
-
Called when a geocoding request succeeds, fails, or times out.
Receives the request status and, if successful, the geocoding results (an array of addresses).
Declaration
Objective-C
typedef void (^_Nonnull RadarGeocodeCompletionHandler)( RadarStatus, NSArray<RadarAddress *> *_Nullable)
Swift
typealias RadarGeocodeCompletionHandler = (RadarStatus, [RadarAddress]?) -> Void
-
Called when an IP geocoding request succeeds, fails, or times out.
Receives the request status and, if successful, the geocoding result (a partial address) and a boolean indicating whether the IP address is a known proxy.
Declaration
Objective-C
typedef void (^_Nonnull RadarIPGeocodeCompletionHandler)( RadarStatus, RadarAddress *_Nullable, BOOL)
Swift
typealias RadarIPGeocodeCompletionHandler = (RadarStatus, RadarAddress?, Bool) -> Void
-
Called when a distance request succeeds, fails, or times out.
Receives the request status and, if successful, the routes.
Declaration
Objective-C
typedef void (^_Nonnull RadarRouteCompletionHandler)(RadarStatus, RadarRoutes *_Nullable)
Swift
typealias RadarRouteCompletionHandler = (RadarStatus, RadarRoutes?) -> Void
-
Called when a matrix request succeeds, fails, or times out.
Receives the request status and, if successful, the matrix.
Declaration
Objective-C
typedef void (^_Nonnull RadarRouteMatrixCompletionHandler)( RadarStatus, RadarRouteMatrix *_Nullable)
Swift
typealias RadarRouteMatrixCompletionHandler = (RadarStatus, RadarRouteMatrix?) -> Void
-
Called when a request to send a custom event succeeds, fails, or times out.
Receives the request status and, if successful, the user’s location, an array of the events generated with the custom event at index 0, and the user.
Declaration
Objective-C
typedef void (^_Nonnull RadarSendEventCompletionHandler)( RadarStatus, CLLocation *_Nullable, NSArray<RadarEvent *> *_Nullable, RadarUser *_Nullable)
Swift
typealias RadarSendEventCompletionHandler = (RadarStatus, CLLocation?, [RadarEvent]?, RadarUser?) -> Void