0

My iOS app need full access to the users contact for certain functions.

If the user refuses this access and later tries to access one of those functions I put up an alert that tells them they need to give permission and the option to go to the settings by clicking 'change permission'

If they click to change permission the app throws the user out to the setting screen for the app in the main iOS settings. If they make the change there, then come back to the app, the screen they left from returns momentarily and then changes to the apps startup screen.

If they go to settings and do not make that change then go back to the app then it just puts up the screen it left from and carries on as normal.

is this normal behaviour when a permissions change is made - does the app need to restart to acknowledge that change?

If thats the case should I be putting something in the app delegate to handle this ?

cheers

SimonTheDiver
  • 1,158
  • 1
  • 11
  • 24

2 Answers2

1

This is fully normal behavior. iOS terminates the app (an app receives SIGKILL signal) in order the new privacy to be applied. You see an old view content, because it was captured with snapshotViewAfterScreenUpdates: when going background (see more at App life cycle docs). Your responsibility here is to save the user data frequently enough. Read Apple's guide for more info.

Sega-Zero
  • 3,034
  • 2
  • 22
  • 46
  • Optionally you may try to use [application:shouldSaveApplicationState:](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/index.html#//apple_ref/occ/intfm/UIApplicationDelegate/application:shouldSaveApplicationState:) / [application:shouldRestoreApplicationState:](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/index.html#//apple_ref/occ/intfm/UIApplicationDelegate/application:shouldRestoreApplicationState:) to restore your app state – Sega-Zero Jun 03 '15 at 12:12
0

I have witnessed the same behavior. So, yes, it seems to be the normal behaviour.

Yevgeniy Leychenko
  • 1,287
  • 11
  • 25
  • I suppose the reason is that apps might not respect changes to the privacy settings. Let's say (just an example) an app has read your location because it was allowed to, then the user disallows it, the app is quite likely to keep using the location that it read before that. – gnasher729 Jun 03 '15 at 13:27