2

My app needs the 'always' location permission. Apple complicated location permission options if apps ask for 'always' directly, so I started asking for 'while using' and then 'always'. This gives the user a first dialog, for 'while using', with buttons of 'Don't Allow' and 'Allow', which is great. However, I'd like the next dialog to have these same buttons (assuming they allow 'while using'), and I was getting this before my upgrade to iOS 11 Beta 5 (I'm not sure - I might have skipped a couple betas).

With iOS 11 Beta 5, I see complicated button text (like 'While using the app' and 'Always' instead of 'Don't Allow'/'Allow') EVEN IF the 'while using' permission is already granted.

I want to give users the simpler options. I think users read these permission dialogs about as often as they read EULAs, and that if it's not a simple allow/don't allow, most will just pick a random option instead of reading, and my app won't have the permission it needs.

Is this possible with the latest iOS 11 Beta? And will it be possible in the final iOS 11? I thought this was what Apple was suggesting - here's some advice (from https://m.rover.io/wwdc-2017-update-significant-updates-to-location-permissions-coming-with-ios-11-41f96001f87f):

For those seeking always permission levels, Apple is now recommending a new permission flow which is essentially a two-phased approach. The first phase or initial onboarding, should only ask for ‘when in use’ permissions...

Cœur
  • 37,241
  • 25
  • 195
  • 267
Crag
  • 1,723
  • 17
  • 35

1 Answers1

3

The dialog stays the same for iOS 11.

With requestWhenInUseAuthorization() iOS will present these options:

enter image description here

If the user allowed location access while in use and you later ask to always access location with requestAlwaysAuthorization(), iOS will present these options. You are already getting the benefit here that Don't Allow Any Access is not offered:

enter image description here

If you ask for requestAlwaysAuthorization() right away before asking for requestWhenInUseAuthorization(), iOS will present these options:

enter image description here

So solve your problem, it is advisable to not just request the iOS dialogs but prepare the user with your own pre-dialog. Only request the iOS dialogs when you are sure that the user will accept. This will lower the chances that a user denies access this time, but maybe would have allowed access in other circumstances. Once the user denies, you cannot request the iOS dialogs anymore.


On a general note:

I think users read these permission dialogs about as often as they read EULAs

Frankly said, that should not be the fundamental assumption on which we develop app workflows and govern user privacy.

Tech companies and the public discourse are increasingly focusing on user privacy. Giving choices is clearly not enough, part of the job is educating users that granting their location 24/7 to some possibly unknown hobby developer or a company in a country with unknown data protection laws is not the same as clicking Yes on an EULA. Also legal changes require that sharing of such sensitive information as your live location cannot be hidden somewhere in an EULA but must be explicitly opted-in by the user.

Thankfully the efforts of companies like Apple ensure responsible access to user data for developers to build great features. This can only be done by giving the choice to the users through conspicuous prompts like the one you are referring to. Because the alternative could be no data sharing or higher hurdles by law.


Update March 2018

To emphasize on the point made above: The recent lack of trust in tech regarding data privacy (Facebook & Cambridge Analytica) confirmed how important is it to understand the responsibility that comes with personal data. The result will be more external regulation - and rightly so. The conclusion for designing data access permission workflows can only be to inform and educate users and to transparently disclose what data is used for what purpose and give an easy to access option to un-share / delete data.


Update May 2018

With the European Union's General Data Protection Regulation (GDPR) coming into effect, it also became mandatory that you need to communicate information about how you process personal data in a way that’s concise, transparent, intelligible, easily accessible and in clear and plain language.

Manuel
  • 14,274
  • 6
  • 57
  • 130
  • "...you later ask to access location while the user it not using the app with requestAlwaysAuthorization()..." do you know how much time is "later" - a minute or an hour of app usage or location tracking? – Lachezar Sep 22 '17 at 10:16
  • 1
    @Lachezar You can request `requestAlwaysAuthorization` anytime. There is no time restriction from iOS. – Manuel Sep 22 '17 at 16:04
  • indeed, I was missing NSLocationAlwaysAndWhenInUseUsageDescription in the info.plist and I was wondering why is the permission dialog not showing :/ – Lachezar Sep 22 '17 at 17:38
  • @Lachezar, have u solved the problem? I have added the key in the plist, but it still not shows the pop up. what i should do? – user6539552 Sep 24 '17 at 16:59
  • @user6539552 I suggest you read the Apple docs about location sharing, and if it still doesn't work open a new question and post our code for others to inspect. – Manuel Sep 24 '17 at 18:33