-
Notifications
You must be signed in to change notification settings - Fork 122
Conversation
platform/ios/src/MGLMapView.mm
Outdated
if (@available(iOS 14, *)) { | ||
if ((manager.authorizationStatus != kCLAuthorizationStatusRestricted || | ||
manager.authorizationStatus != kCLAuthorizationStatusAuthorizedAlways || | ||
manager.authorizationStatus != kCLAuthorizationStatusAuthorizedWhenInUse) && | ||
manager.accuracyAuthorization == CLAccuracyAuthorizationReducedAccuracy && | ||
[self accuracyDescriptionString] != nil ) { | ||
[self.locationManager requestTemporaryFullAccuracyAuthorizationWithPurposeKey:@"MBXAuthorizationAccuracyDescription"]; | ||
} else { | ||
[self validateLocationServices]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
c0810bf
to
e7ae563
Compare
LGTM, no concerns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one concern about documentation, but I don't want it to block a release, perhaps lets just note it for follow up work.
@@ -10,6 +10,21 @@ Mapbox-hosted vector tiles and styles require an API access token, which you can | |||
|
|||
As an alternative, you can use `MGLAccountManager.accessToken` to set a token in code. See [our guide](https://www.mapbox.com/help/ios-private-access-token/) for some tips on keeping access tokens in open source code private. | |||
|
|||
## MGLAccuracyAuthorizationDescription | |||
|
|||
Set the Mapbox accuracy authorization description string as an element of `NSLocationTemporaryUsageDescriptionDictionary` to be used by the map to request authorization when the `MGLLocationManager.accuracyAuthorization` is set to `CLAccuracyAuthorizationReducedAccuracy`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we note that this is only available in iOS 14+?
e7ae563
to
89e70fc
Compare
Adds a new Info.plist property to request accuracy authorization when the accuracy is
CLAccuracyAuthorizationReducedAccuracy
and has authorized location updates.