Skip to main content
RadarTrip represents a trip that has been started with Radar’s trip tracking feature. It contains information about the trip’s destination, status, ETA, and metadata. Trip objects are returned in location callbacks and can be accessed via RadarUser.trip.

Properties

String
The Radar ID of the trip. This is assigned by the server when the trip is created.
String
The external ID of the trip. This is the unique ID you provided when creating the trip.
NSDictionary
The optional set of custom key-value pairs for the trip. This contains any custom data attached to the trip.
String
For trips with a destination, the tag of the destination geofence.
String
For trips with a destination, the external ID of the destination geofence.
RadarCoordinate
For trips with a destination, the location of the destination geofence. Contains latitude and longitude coordinates.
RadarRouteMode
The travel mode for the trip. Used to calculate ETA and distance.Values:
  • RadarRouteModeFoot - Walking
  • RadarRouteModeBike - Biking
  • RadarRouteModeCar - Driving
  • RadarRouteModeTruck - Truck
  • RadarRouteModeMotorbike - Motorcycle
float
For trips with a destination, the distance to the destination geofence in meters based on the travel mode for the trip.
float
For trips with a destination, the ETA to the destination geofence in minutes based on the travel mode for the trip.
RadarTripStatus
The status of the trip.Values:
  • RadarTripStatusUnknown - Unknown status
  • RadarTripStatusStarted - Trip has been started
  • RadarTripStatusApproaching - Device is approaching the destination (within the approaching threshold)
  • RadarTripStatusArrived - Device has arrived at the destination
  • RadarTripStatusExpired - Trip has expired
  • RadarTripStatusCompleted - Trip has been completed
  • RadarTripStatusCanceled - Trip has been canceled
NSArray<RadarTripOrder *>
The optional array of trip orders associated with this trip. Orders provide additional context about deliveries or pickups.
NSArray<RadarTripLeg *>
For multi-destination trips, the array of trip legs. Each leg represents a stop along the trip route and contains destination info, status, and metadata.Use leg._id when calling updateTripLeg.See RadarTripLeg for more details.
String
For multi-destination trips, the ID of the current active leg. This identifies which leg the device is currently traveling to.

Initializers

initWithObject

Initializes a RadarTrip instance from a server response object.
id
required
A dictionary object from the server containing trip data.
Returns: A RadarTrip instance, or nil if the object is invalid.

Instance Methods

dictionaryValue

Converts the trip instance to a dictionary representation. Returns: A dictionary containing all trip properties.

Status Lifecycle

A trip progresses through several statuses during its lifecycle:
  1. Started - The trip has been created and tracking has begun
  2. Approaching - The device is within the approaching threshold of the destination
  3. Arrived - The device has reached the destination geofence
  4. Completed - The trip has been manually completed
  5. Canceled - The trip has been manually canceled
  6. Expired - The trip has expired (typically after being in arrived state)

Usage Examples

Accessing the Current Trip

Monitoring Trip Status

Working with Multi-Destination Trips