IosLocationTracker
iOS location via CoreLocation, counterpart to Android's FusedLocationProvider.
Configured for continuous background tracking:
requestWhenInUseAuthorization() first, then escalate to requestAlwaysAuthorization() once WhenInUse is granted (see locationDelegate's
didChangeAuthorizationcallback). Requesting Always eagerly risks the OS silently downgrading the prompt to WhenInUse-only on some iOS versions if the user hasn't first seen (and accepted) the WhenInUse prompt.allowsBackgroundLocationUpdates = true: required for continuous background tracking (the
locationbackground mode must also be listed in the app's Info.plist).pausesLocationUpdatesAutomatically = false: prevents CoreLocation from silently halting delivery when the device is stationary, which would produce false zero-distance periods.
startMonitoringSignificantLocationChanges(): lets the OS relaunch a terminated/killed app when the device moves ~500 m.
The consuming app's Info.plist needs: UIBackgroundModes: location NSLocationAlwaysAndWhenInUseUsageDescription / NSLocationWhenInUseUsageDescription: an app-specific rationale string for the location prompt.