Permission refresh after changing it in settings

I am running into an issue in my app where the user has denied access to the camera, camera roll and contacts.


I check if the user gave permission for the camera roll with:

ALAuthorizationStatus status = [ALAssetsLibrary authorizationStatus];


The camera with:

AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];


and contacts with:

ABAddressBookGetAuthorizationStatus()


If the user has denied access at first I give them an option to redirect to the iPhone settings and give permission. The issue i am having (esspecially in iOS 9, with the back to app button) is if I am in my app trying to get access to any of these 3 things, and if the user redirects to the settings, and the user gives permission then they go back into my app the authorization status does not change. The only way I found it to change is if they restart the app. Is there any other way you can refresh the authorization stautus in the same view controller they left off in?

I'm slightly shocked that no-one from Apple has commented on what is a very confusing scenario (which I am just encountering myself).


When I run my app in a simulator, and switch to the Settings app to change the privacy settings the camera for my app, I see the following in the simulator's log:


Mar 3 22:10:04 MacBook-Pro Preferences[72629]: ########### Quitting application (com.XXX.YYY) in response to privacy settings change.


If I run on a real device in debug mode (i.e. tethered by USB), I see the same thing:


Mar 3 22:05:21 iPhone Preferences[2053] <Warning>: ########### Quitting application (com.XXX.YYY) in response to privacy settings change.


My main question is what I can expect in "production", i.e. after the app has been released? I'm not at that stage yet, so I simply changed the permissions for another app on my phone (Instagram) and observed the log messages, which were basically the same:


Mar 3 22:14:27 iPhone Preferences[2053] <Warning>: ########### Quitting application (com.burbn.instagram) in response to privacy settings change.

Mar 3 22:14:27 iPhone com.apple.xpc.launchd[1] (UIKitApplication:com.burbn.instagram[0x2eac][1794]) <Notice>: Service exited due to signal: Killed: 9

Mar 3 22:14:27 iPhone SpringBoard[58] <Warning>: Application 'UIKitApplication:com.burbn.instagram[0x2eac]' exited abnormally via signal.


So, unless I discover otherwise, it seems that one's app is always killed when an underlying permission changes? It would be nice if Apple could describe what is supposed to happen?

Permission refresh after changing it in settings
 
 
Q