Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

iOS 14 location privacy settings update #361

Merged
merged 4 commits into from
Aug 11, 2020
Merged

Conversation

fabian-guerra
Copy link
Contributor

@fabian-guerra fabian-guerra commented Aug 3, 2020

Fixes #337

iOS 14 has a new privacy setting related to location accuracy. It means that users may be able to revoke the level of location accuracy the app has permission to use. When this happens apps will not be able to change manually this setting. However in order to request full location accuracy for a short period of time this pr introduces requestTemporaryFullAccuracyAuthorizationWithPurposeKey which is on pair of CLLocationManager. requestTemporaryFullAccuracyAuthorizationWithPurposeKey. Developers can check the location accuracy MGLLocationManager. accuracyAuthorization and if it is CLAccuracyAuthorizationReducedAccuracy then they can call requestTemporaryFullAccuracyAuthorizationWithPurposeKey to gain full accuracy for a short period of time. Enough to complete their use case.

@fabian-guerra fabian-guerra added enhancement New feature or request MapKit parity labels Aug 3, 2020
@fabian-guerra fabian-guerra self-assigned this Aug 3, 2020
@fabian-guerra fabian-guerra changed the title Fabian lm ios14 337 iOS 14 location privacy settings update Aug 4, 2020
@fabian-guerra fabian-guerra marked this pull request as ready for review August 5, 2020 16:41
@fabian-guerra fabian-guerra requested a review from 1ec5 as a code owner August 5, 2020 16:41
@fabian-guerra fabian-guerra requested review from a team, julianrex and nishant-karajgikar and removed request for 1ec5 August 5, 2020 16:41

- (void)requestTemporaryFullAccuracyAuthorizationWithPurposeKey:(NSString *)purposeKey {
if (@available(iOS 14.0, *)) {
[self.locationManager requestTemporaryFullAccuracyAuthorizationWithPurposeKey:purposeKey];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing we need to add a new purpose key in the plist now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DO we need to make any changes to documentation to reflect this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key comes from Apple. But yes we will have to modify our docs.

@captainbarbosa
Copy link
Contributor

I think this requires a changelog entry.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request MapKit parity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update MGLLocationManager to iOS 14
3 participants