Supporting iOS14 Approximate Location with Maps SDK v6.2.0

Developers can begin working with Mapbox iOS SDK version v6.2.0 to fully support Apple iOS 14, including Approximate Location. We recommend that iOS developers begin using Mapbox SDK v6.2.0 as soon as possible to update their apps, providing a smooth experience for users on iOS 14.
iOS 14’s Approximate Location feature allows users to reduce the precision of location data shared with an app. When a user enables Approximate Location for an app, it will receive obfuscated data instead of the user’s exact location — only the general area of the end user will be reported, rather than the precise location data available in previous iOS versions. The size of this area will vary between dense urban areas and less populous ones. Apple has suggested that a typical size for the area is a 5km radius. Approximate Location reduces location data’s frequency, too: when enabled, location is recomputed about four times per hour. A thorough discussion of Approximate Location can be found in the What’s New In Location talk from this year’s WWDC.
Mapbox iOS SDK version v6.2.0 fully supports iOS Approximate Location by wrapping and augmenting the iOS CoreLocation API, making it easier for developers to build in iOS 14 while avoiding the negative user experiences that Approximate Location can cause. Notable features include:
- [MGLMapViewDelegate mapView:didChangeLocationManagerAuthorization:] allows apps to take action whenever an end user enables or disables Approximate Location.
- [MGLLocationManager.accuracyAuthorization] reflects the level of precision that the end user has authorized.
- Developers may request temporary access to full-precision location information with [MGLLocationManager.requestTemporaryFullAccuracyAuthorizationWithPurposeKey:].
- When an MGLUserTrackingMode that requires precise user location is enabled, the SDK will automatically check for and, if needed, prompt the user to grant permission.
- User location annotations will automatically reflect when precise location data is not available.
Approximate Location will bring valuable new privacy controls to end users. But it also means that apps that use location data will risk delivering bad user experiences if they do not prepare for scenarios in which Approximate Location is enabled.

Many location use cases require precise location data. Features like navigation, displaying user location, or fitness tracking will behave in undesirable ways or become unusable when Approximate Location is enabled. Examples of undesirable or unexpected behaviors that apps should plan to address:
- Confusing user location sharing. If end users share their location with others and the app does not have a way to mark a shared location as precise or approximate, users may have confusing and problematic interactions. Example: two users attempting to meet up at a location are confused by an approximate shared location.
- Unusable navigation. Navigation workflows rely on a frequently updated measurement of the end user’s precise location in order to position the map, detect the need for route recalculation, monitor speed and provide prompts for upcoming maneuvers. Approximate Location provides updates with insufficient precision and frequency for any of these tasks. Example: a user launches an automotive navigation feature with approximate location enabled, causing their position to appear stationary even though their car begins moving.
- Unexpected location information. End users may regard Approximate Location information as incorrect. Example: an end user is surprised to see their social media posts tagged as originating from a place they have never visited.
- Data pollution. If an app publishes and stores user location data and does not have a way to detect location data’s level of precision, it may not be able to easily filter out data points collected while Approximate Location is turned on. Example: an app collecting fitness data in the background reports inaccurate metrics (e.g. average walking pace) by failing to discard data collected while Approximate Location is enabled.
The default state of iOS 14’s location permission UI will allow the collection of precise location data, and previously installed apps will retain their already-granted access to precise location information when users upgrade to iOS14. But developers should still check if precise location data is available before their apps launch features that depend on it.
When precise location is needed but unavailable, developers must ask the end user for access to it, whether through a temporary authorization or a change in the app’s system settings. Developers also need to account for changes in location precision at unexpected times, since users may visit an app’s system settings and disable its access to precise location data whenever they wish. The Mapbox SDK offers ways to detect when such changes occur.

App developers need to upgrade to Mapbox iOS SDK version v6.2.0 or later to fully support iOS Approximate Location. Previous versions of the Mapbox SDK do not support iOS Approximate Location. There are no plans to backport these changes to any previous versions of the SDK.
Download the release, read the detailed docs, and keep an eye on the blog for additional updates to our Maps SDK.
This post was updated on September 21, 2020 to reflect that both iOS 14 and Mapbox iOS SDK v6.2.0 are no longer in beta.