Navigation applications frequently update the driver’s precise location in order to position the map, to detect the need for route recalculation, monitor speed, and to provide prompts for upcoming maneuvers. With iOS 14’s introduction of Approximate Location mode, the precision of location data shared with an application can be reduced -- developers need to upgrade to version 1.0 of the Mapbox Navigation SDK for iOS to support iOS 14 and maintain data fidelity and navigation accuracy.
When Approximate Location is enabled applications only receive obfuscated data instead of the driver's exact location – only the general area of the phone, rather than the street-level location data that is available in previous iOS versions. The size of this area will vary between dense urban areas and less populous areas. Approximate Location also affects how frequently an application detects a driver’s new location, reducing it from once a second to only a few times per hour. For more details watch the ‘What’s New In Location’ talk from this year’s WWDC for a more thorough discussion of Approximate Location.
Tracking deliveries: Approximate locations lack the precision and frequency required for navigating. This can result in unexpected behaviors, affecting the application’s basic usability. For example, a driver could appear stationary even though the car is moving or could jump between large distances.
Route tuning and dispatching: Once driver applications upgrade to Navigation SDK v1.0, dispatchers can keep using front-end tools to visualize routes and make instant adjustments to stops. The route tuner reads in a data file consisting of routes, drivers, and packages collected from the SDK. The application can be configured to push changes out to the back-end systems such as package sorting or task assignment services. See a live demo:
Asset tracking: With Navigation SDK v1.0, developers can detect and prevent data pollution that Approximate Location might otherwise cause. If an application collects and stores location data but does not take the steps to detect the data’s level of precision, it will not be able to filter out data points collected while Approximate Location is turned on. For example, an application collecting the driver’s mileage in the background will end up with inaccurate metrics (e.g., average trip distance) by failing to discard data collected while Approximate Location is enabled.
Ride hailing: If a rider shares their location with a driver for pickup, the application needs a way to confirm that the rider is sharing an accurate location. When precise location is needed but the driver has chosen not to provide it, developers can use Core Location to ask the driver for access to precise location, whether through a temporary authorization or a change in the application’s system settings.
SDK update required: Developers can now upgrade to Mapbox Navigation SDK v1.0 to support the updated Location Services functionality on iOS 14. These changes primarily affect new drivers. Drivers with previously installed navigation applications have already granted access to precise location information, and their existing settings will persist through the iOS 14 upgrade. When new drivers install the application, the default state of iOS 14’s location permission UI will allow the collection of precise location data. But although these defaults will help minimize disruption, developers still need to prepare for Approximate Location or risk delivering a bad navigation experience.
Navigation SDK v1.0 is ready for iOS 14’s Approximate Location because it incorporates the latest version of the Mapbox Maps SDK for iOS. By augmenting the Core Location framework, it allows developers to stay up to date with iOS 14 while avoiding negative navigation experiences from Approximate Location. Take advantage of the following map APIs when implementing an enhanced free-drive mode:
- MGLMapViewDelegate.mapView(:didChangeLocationManagerAuthorization:) and PassiveLocationManager.accuracyAuthorization allow applications to display a warning the driver enables Approximate Location, reminding them to disable it before navigating.
- If an application only needs brief access to full-precision location data developers can display a route from the driver’s current location, call PassiveLocationManager.requestTemporaryFullAccuracyAuthorization(withPurposeKey:).
- When an MGLUserTrackingMode that requires precise driver location is enabled, the SDK will automatically check for permissions and prompt the driver if needed.
- Driver’s location annotation automatically reflects when precise location data is unavailable by turning into a large disc.
Support for iOS Approximate Location is only available on Navigation SDK v1.0 and higher. We will continue to track future Apple updates to iOS14 closely and adjust our SDK as needed. Download the release, read the detailed documentation, and keep an eye on the blog for additional updates to our Navigation SDK.