Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS location permission after app reinstall

I’m using Crashlytics for internal application tests and noticed one interesting thing. I’m using geolocation in my app and asking for permissions from a user. When customer install app for first time he sees default Apple’s geolocation permissions asking pop up. And everything work fine. But, if user will remove app from phone and install it again... in this case, when I’m asking for permissions, pop up just won’t appear BUT geolocation is WORKING. How? Is this some sort of new feature or iOS issue? I were testing with iOS 11.0.3. I haven’t found anything in documentation, and haven’t seen this behavior in previous iOS versions. Looks like iOS just memorize the app and automatically enables geolocation when I’m asking for user permissions instead of showing pop up. Maybe someone has answer for this?

like image 656
SIlvester Avatar asked Oct 25 '17 20:10

SIlvester


People also ask

How do I allow location access to apps on iPhone?

You can turn Location Services on or off at Settings > Privacy > Location Services. You can turn Location Services on either during the Setup Assistant process or later through the Location Services setting. You can individually control which apps and system services have access to Location Services data.

How do I give an app permission to Find My iPhone?

Go to Settings > Privacy, then select Location Services. Select an app, then turn Precise Location on or off.

How do I reset my location on my iPhone?

Resetting Location Services Just open Settings and tap General -> Reset -> Reset Location & Privacy. You'll need to enter your iPhone passcode to reset your Location Services. This will change your location and privacy settings back to the way they were when you first got your iPhone.


1 Answers

it is possible that there could be a mistake in your code pattern while checking authorization status, the behavior you are seeing is likely due to iOS caching location permissions for apps.

In your code, make sure that you check authorization status (via the authorizationStatus() method), and continue with requesting location authorization when the current status is .notDetermined (kCLAuthorizationStatusNotDetermined)

iOS does cache authorization status for apps as well. If you would like to reset your location permissions for testing purposes, you can set your location privacy settings to the factory default: go to Settings > General > Reset and tap Reset Location & Privacy. When your location and privacy settings are reset, apps will stop using your location until you grant them permission.

Unfortunately there is no developer control over this. Caching of permissions for apps is in an ever evolving stage, where we are trying to find the best user experience, so you may have noticed some changes lately. Also, there will be a grace period where the app uninstall to reinstall time might be making a difference.

If your observations of apps that behave like you expected are recent (on the same version of iOS that you have observed your app behave differently), and the uninstall/reinstall time difference is immediate (like how you probably test your app), please let me know which apps, and I will see if I can dig some information.

like image 181
Ankit Vyas Avatar answered Oct 01 '22 19:10

Ankit Vyas