Skip to main content
Represents the current user state. This includes the user’s location, geofences, place, beacons, regions, segments, and trip information.

Properties

_id
String
required
The Radar ID of the user.
userId
String
The unique ID of the user, provided when you identified the user. May be nil if the user has not been identified.
deviceId
String
The device ID of the user.
__description
String
The optional description of the user. Not to be confused with the NSObject description property.
metadata
[String: Any]
The optional set of custom key-value pairs for the user.
location
CLLocation
required
The user’s current location.
altitude
Double
required
The user’s current altitude in meters.
activityType
RadarActivityType
required
The user’s current activity type. See Activity Types for possible values.
geofences
[RadarGeofence]
An array of the user’s current geofences. May be nil or empty if the user is not in any geofences.See the Geofences documentation for more information.
place
RadarPlace
The user’s current place. May be nil if the user is not at a place or if Places is not enabled.See the Places documentation for more information.
beacons
[RadarBeacon]
An array of the user’s nearby beacons. May be nil or empty if the user is not near any beacons or if Beacons is not enabled.See the Beacons documentation for more information.
stopped
Bool
required
A boolean indicating whether the user is stopped.
foreground
Bool
required
A boolean indicating whether the user was last updated in the foreground.
country
RadarRegion
The user’s current country. May be nil if country is not available or if Regions is not enabled.See the Regions documentation for more information.
state
RadarRegion
The user’s current state. May be nil if state is not available or if Regions is not enabled.See the Regions documentation for more information.
dma
RadarRegion
The user’s current designated market area (DMA). May be nil if DMA is not available or if Regions is not enabled.See the Regions documentation for more information.
postalCode
RadarRegion
The user’s current postal code. May be nil if postal code is not available or if Regions is not enabled.See the Regions documentation for more information.
nearbyPlaceChains
[RadarChain]
The user’s nearby chains. May be nil if no chains are nearby or if nearby chains are not enabled.
segments
[RadarSegment]
The user’s segments. May be nil if segments are not enabled.
topChains
[RadarChain]
The user’s top chains. May be nil if segments are not enabled.
source
RadarLocationSource
required
The source of the user’s current location. See Location Sources for possible values.
trip
RadarTrip
The user’s current trip. May be nil if the user is not currently on a trip.See the Trip Tracking documentation for more information.
debug
Bool
required
A boolean indicating whether the user is marked as debug.
fraud
RadarFraud
The user’s current fraud state. May be nil if Fraud is not enabled.See the Fraud documentation for more information.

Activity Types

The RadarActivityType enum defines the types of user activity:
unknown
RadarActivityType
Unknown activity (0).
stationary
RadarActivityType
Stationary activity (1).
foot
RadarActivityType
Walking activity (2).
run
RadarActivityType
Running activity (3).
bike
RadarActivityType
Biking activity (4).
car
RadarActivityType
Driving activity (5).

Location Sources

The RadarLocationSource enum defines the sources for location updates:
foregroundLocation
RadarLocationSource
Foreground location update.
backgroundLocation
RadarLocationSource
Background location update.
manualLocation
RadarLocationSource
Manual location update.
visitArrival
RadarLocationSource
Visit arrival location update.
visitDeparture
RadarLocationSource
Visit departure location update.
geofenceEnter
RadarLocationSource
Geofence enter location update.
geofenceExit
RadarLocationSource
Geofence exit location update.
mockLocation
RadarLocationSource
Mock location update.
beaconEnter
RadarLocationSource
Beacon enter location update.
beaconExit
RadarLocationSource
Beacon exit location update.
unknown
RadarLocationSource
Unknown location source.

Methods

dictionaryValue

func dictionaryValue() -> [AnyHashable: Any]
- (NSDictionary *_Nonnull)dictionaryValue;
Converts the user to a dictionary representation. Returns: A dictionary representation of the user.

Nested Objects

See Also