Skip to main content

Overview

The Radar iOS SDK provides flexible location tracking capabilities, from foreground tracking to continuous background tracking with configurable presets. You can track location once in the foreground, or start background tracking with options optimized for different use cases.

Foreground Tracking

Track the user’s location once in the foreground using trackOnce().

Track with Custom Accuracy

You can specify desired accuracy and beacon ranging options:
Accuracy Options
  • RadarTrackingOptionsDesiredAccuracyHigh - Uses kCLLocationAccuracyBest
  • RadarTrackingOptionsDesiredAccuracyMedium - Uses kCLLocationAccuracyHundredMeters (default)
  • RadarTrackingOptionsDesiredAccuracyLow - Uses kCLLocationAccuracyKilometer

Track with Manual Location

You can manually update the user’s location:
Manual location tracking calls are subject to rate limits. Use background tracking for continuous location updates.

Background Tracking

Start background tracking with configurable options to monitor location continuously.

Tracking Presets

Radar provides three built-in tracking presets optimized for different use cases:
1

Continuous Tracking

Updates about every 30 seconds while moving or stopped. Moderate battery usage. Shows the flashing blue status bar during tracking.
Use Cases: Real-time delivery tracking, ride-sharing, live location sharing
2

Responsive Tracking

Updates about every 2.5 minutes when moving and shuts down when stopped to save battery. Once stopped, the device will need to move more than 100 meters to wake up and start moving again. Low battery usage.
Use Cases: Curbside pickup, fleet tracking, asset tracking
Location updates may be delayed significantly by Low Power Mode, or if the device has connectivity issues, low battery, or Wi-Fi disabled.
3

Efficient Tracking

Uses the iOS visit monitoring service to update only on stops and exits. Once stopped, the device will need to move several hundred meters and trigger a visit departure to wake up. Lowest battery usage.
Use Cases: Store visits, loyalty programs, analytics

Custom Tracking Options

You can create custom tracking options for fine-grained control:

Tracking Options Reference

Stop Tracking

Stop background tracking:

Check Tracking Status

Check if tracking has been started:

Get Current Tracking Options

Retrieve the current tracking options:

Get Location

Get the device’s current location without tracking:

Mock Tracking for Testing

Simulate user movement for testing:
Mock tracking is useful for testing geofence entry/exit events and trip tracking during development.

Anonymous Tracking

Enable anonymous tracking to avoid creating user records on the server:
Anonymous tracking avoids sending stable device IDs, user IDs, and user metadata to the server. This limits some functionality but enhances privacy.

Listening for Events

Implement the RadarDelegate protocol to receive location updates and events client-side:

Best Practices

Choose the Right Preset

Select a tracking preset based on your use case. Continuous for real-time tracking, Responsive for balanced updates, Efficient for visit-based tracking.

Request Permissions

Request location permissions before starting tracking. Use requestAlwaysAuthorization() for background tracking.

Test with Mock Tracking

Use mock tracking during development to simulate user movement and test your integration.

Monitor Battery Usage

Balance location accuracy and update frequency with battery usage. Use Efficient preset for best battery life.
For more details on tracking, visit the Radar documentation.