Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Apps that only need "WhenInUse" authorization Level #181

Closed
ahalls opened this issue Dec 30, 2017 · 3 comments
Closed

Support Apps that only need "WhenInUse" authorization Level #181

ahalls opened this issue Dec 30, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@ahalls
Copy link
Contributor

ahalls commented Dec 30, 2017

I think you have misunderstood the limitation imposed in iOS 11 in this area. It is not that Always is required, it's that WhenInUse is required. Apps can no longer offer Always as the only option. If the app developer wants to use background tracking (Always) they must also offer WhenInUse.

Kuba Suder's post Changes to location tracking in iOS 11 covers it in detail.

His quote from Brad Jensen's WWDC talk, explains Apple decision that forcing the user to give the app “Always” location access is a bad user experience:

Now, a second reason we think that many developers choose to require Always authorization is they’re simply trying to give their users the best possible experience (…) but this makes for a very poor user experience for the users that don’t wish to grant the app Always authorization. They are forced to choose between granting the app Always, which is more than they would like in this example, or granting it Never, which means they don’t get to benefit from any of the app’s location-based features. And their final option is to grant it Always and then revoke that authorization after they’re done using the app. In any case, the user is not having a great time with this app.

With SwiftLocation 3.1.0. a fatal error is issued when the app requests WhenInUse access only.

Error Message:
fatalError("To use location services in iOS 11+, your Info.plist must provide a value for NSLocationAlwaysAndWhenInUseUsageDescription.") `
File: shared.swift, line: 252

It should accept this configuration.

@ahalls ahalls changed the title Support Apps that only want "WhenInUse" authorisation Level Support Apps that only want "WhenInUse" authorization Level Dec 31, 2017
@ahalls ahalls changed the title Support Apps that only want "WhenInUse" authorization Level Support Apps that only need "WhenInUse" authorization Level Jan 1, 2018
ahalls added a commit to GaltSoft/SwiftLocation that referenced this issue Jan 1, 2018
ahalls added a commit to GaltSoft/SwiftLocation that referenced this issue Jan 1, 2018
@J7mbo
Copy link

J7mbo commented Jan 7, 2018

Any idea if this will be merged any time soon?

malcommac added a commit that referenced this issue Mar 16, 2018
- #197 Added neighborhood and formatAddress in Place
- #187 Fixed an issue with Geocoder Requests which does not complete (all requests are now keep alive by the singleton and removed automatically, so you don't need to keep it manually; moreover all lists of requests are thread safe).
- #181 Support Apps that only need "WhenInUse" authorization Level (fixed a crash).
- #180 Each listener now will return a token id you can use to remove the listener itself as you need.
@malcommac
Copy link
Owner

Fixed in 3.2.0. Thanks for reporting.

@malcommac malcommac added this to the 3.2.0 milestone Mar 16, 2018
@malcommac malcommac added the bug label Mar 16, 2018
@malcommac malcommac self-assigned this Mar 16, 2018
@J7mbo
Copy link

J7mbo commented Mar 16, 2018

Thanks a lot @malcommac!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants