Apple changed the way apps can ask for permission to use your location in iOS 8. Previously, apps simply asked for permission to use your location, which you could allow or deny. If you allowed access, the app could use your location anytime, even while it was in the background. Once set, the permissions could be changed in the Settings app.
In iOS 8, Apple added some additional granularity to location permissions. Instead of a one-size-fits-all permission, apps can now choose whether to request access to your location only when the app is in use, or all the time (even in the background). It’s a great distinction to make from a user’s standpoint, because it means you have more control over your privacy.
However, there are a couple of catches that make for a bad user experience. Apps can only ask for one level of access, and can only ask once. Developers have to choose how much access to request. Once you’ve asked for “when in use” authorization, for example, you can’t ask again for “always” permissions. You also can’t display a dialog asking the user to choose between “Always,” “When in use,” or “Never.” (You could work around this with some clever use of dialogs, but it feels a little hacky.)
The best practice Apple is promoting to developers is to ask for the least permissions you need at first, then move up in response to user action. In the WWDC talk about Core Location this year (session 706, “What’s New in Core Location”), Apple used the example of an amusement park app. Most of the time, the app only needs “when in use” authorization to show your location on a map, so it asks for that level of access at launch. But there’s also an extra feature that uses region monitoring to let you know when you get near specific attractions, even when the app is in the background. For that feature, the app needs “always” authorization. The problem is, once you’ve granted “when in use” authorization, the app can’t prompt you for more access.
Apple’s solution to this problem is to let developers send users to the Settings app so that they can change the location permissions for your app. This feels like a classic “sweet solution.” It’s not a good experience to boot users out into the Settings app, even if it’s directly to the settings for your app’s location permissions. It breaks the user out of your UI, and there’s no obvious way to get back to your app after they’ve changed settings.
I’m sure the goal here is to prevent apps from constantly badgering you for access to your location. It’s a good goal, and one Apple should stick with. The problem is, in the pursuit of that goal they’ve created a disincentive to follow the best practice. Because you can only ask for location access once, developers will feel that they need to ask for the maximum permissions they think they’ll ever need, even if a minority of users will ever benefit. Moreover, a dialog offering to send you over to the settings app to change a preference doesn’t feel like much of an improvement over a dialog asking for greater location permissions.
A relatively minor change could resolve a lot of these problems: Allow apps to ask for permission once per type of authorization. If a user allows “when in use” authorization, then allow the app to ask for “always” authorization later. (But only once. If the user says no, that’s it.) If the user denies “when in use” authorization, the app can’t prompt again for any level of access. If the user denies “always” authorization, allow the app to ask for “when in use” authorization instead, or give them both options at the outset.
Apple was smart to give users more control over their location data in iOS 8. It would be even smarter if they tweaked the implementation so that choosing those permissions is a better experience.