Track location continuously in the background
WHAT IT TESTS: Tuning Core Location for accuracy versus battery and enabling background updates. OUTLINE: Set desiredAccuracy, distanceFilter, activityType; enable the Location background mode and allowsBackgroundLocationUpdates; request Always authorization.
WHAT IT TESTS: Whether you can balance accuracy against battery and know the background requirements. ANSWER OUTLINE: Configure desiredAccuracy (best for navigation), distanceFilter to throttle updates, and activityType like automotiveNavigation so the system optimizes. For background, enable the Location updates background mode in capabilities, set allowsBackgroundLocationUpdates = true, request Always authorization with a plist usage string, and show the blue status indicator.
Read the original → interview
- #ios
- #core-location
- #background-modes
- #battery
- #navigation
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.