Hacker News new | ask | show | jobs
by wingerlang 3840 days ago
I think this http://i.imgur.com/bgAJfwI.png is not something us iOS developers have any control over. It is a message that automatically will pop up upon starting the app, as opposed to the location message when we are asking for the location. (This one is saying the app might use it in the background).
2 comments

I don't think this is the case. On iOS 8.0+ there's a method on `CLLocationManager` called `requestAlwaysPermission` that causes this popup to appear. I'm not positive about older iOS versions, but I thought they asked for permission when you started using `CLLocationManager`.

https://developer.apple.com/library/ios/documentation/CoreLo...

After searching around a bit it seems that you are right. Time to update our code then.
I think the best practice there is to "prime" the user before they see the iOS permission prompts. Something like "your phone will now ask for permission to access your location. We need this to do x,y,z.."
Sure, but my point is that for this very specific one (app may use location in the background) we are unable to do the priming as this one will be displayed by the app automatically (as opposed to most/all other such popups).
Right, that makes sense. Wasn't thinking about the consequences of it being the background location prompt specifically
That's just an extra step sadly. But yeah