Required capabilities
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.
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.
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
TheshowBlueBar 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:Significant location changes
Use the iOS significant location change service:Geofence syncing
Sync nearby geofences from the server to improve responsiveness:Check tracking status
Check whether tracking is currently active: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
Background tracking not working
Background tracking not working
- 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
Blue status bar showing unexpectedly
Blue status bar showing unexpectedly
Set
showBlueBar to false and use useStoppedGeofence or useMovingGeofence instead for background tracking without the blue bar.High battery usage
High battery usage
- Use
.presetResponsiveor.presetEfficientinstead of.presetContinuous - Increase
desiredMovingUpdateIntervalanddesiredStoppedUpdateInterval - Set
desiredAccuracyto.mediumor.low - Enable
useStoppedGeofenceand setdesiredStoppedUpdateIntervalto0to shut down when stopped