Skip to main content
The Radar iOS SDK provides powerful background tracking capabilities to monitor user location even when your app is not in the foreground. This guide covers the necessary configuration and implementation details.

Required capabilities

1

Enable Location Updates background mode

Open your Xcode project and navigate to your app target’s Signing & Capabilities tab.Click the + Capability button and add Background Modes.Enable Location updates to allow the SDK to receive location updates in the background.
2

Configure Info.plist

Add the required location usage descriptions to your Info.plist:
Customize these descriptions to accurately reflect how your app uses location data.
3

Request location permissions

Request the appropriate location permission level from the user:
Always request WhenInUse permission before requesting Always permission to follow Apple’s recommended flow.

Background tracking presets

Radar provides three preset tracking configurations optimized for different use cases:

Continuous tracking

Updates about every 30 seconds while moving or stopped. Moderate battery usage. Shows the flashing blue status bar during tracking.

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.
Location updates may be delayed significantly by Low Power Mode, or if the device has connectivity issues, low battery, or Wi-Fi disabled.

Efficient tracking

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

Custom tracking options

For more control, create custom tracking options:

Background mode options

Blue status bar

The showBlueBar property determines whether the flashing blue status bar is shown when tracking in the background:

Client-side geofencing

Use iOS region monitoring to create client geofences around the device’s current location:

Visit monitoring

Use the iOS visit monitoring service for lowest battery usage:
Learn more about visit monitoring in Apple’s documentation.

Significant location changes

Use the iOS significant location change service:
Learn more about significant location changes in Apple’s documentation.

Geofence syncing

Sync nearby geofences from the server to improve responsiveness:

Check tracking status

Check whether tracking is currently active:
Get the current tracking options:

Stop tracking

Stop background tracking:

Best practices

Request permissions carefully

Follow Apple’s guidelines for requesting location permissions. Always explain why you need the permission before requesting it.

Choose the right preset

Use the preset that matches your use case. Don’t use continuous tracking if responsive or efficient will work.

Test in background

Test your app’s background tracking behavior with the device locked and the app in the background.

Monitor battery usage

Use Xcode’s Energy Log instrument to monitor your app’s battery impact.

Troubleshooting

  • Verify the Location updates background mode is enabled
  • Ensure you have requested “Always” location authorization
  • Check that location services are enabled on the device
  • Verify your Info.plist includes the required usage descriptions
Set showBlueBar to false and use useStoppedGeofence or useMovingGeofence instead for background tracking without the blue bar.
  • Use .presetResponsive or .presetEfficient instead of .presetContinuous
  • Increase desiredMovingUpdateInterval and desiredStoppedUpdateInterval
  • Set desiredAccuracy to .medium or .low
  • Enable useStoppedGeofence and set desiredStoppedUpdateInterval to 0 to shut down when stopped