App Crashed in iOS 6 When User Changes Contacts Access Permissions

App crashed in iOS 6 when user changes Contacts access permissions

I've seen this in my own app. And I've seen others report this as well. I'm pretty sure this is deliberate behavior. The OS kills any background apps that react to changes in privacy permissions. Apple appears to have taken a sledgehammer approach to this. It's not a crash (though it may appear so when running in the debugger). Apps get terminated for various other reasons. Add this to the list of reasons. This gives us more reason to do a good job restoring app state upon a full restart of our apps.

Note that this behavior applies to all of the various privacy settings such as contacts, photos, microphone, calendar, and camera.

App crash when change permission AddressBook in Settings

Your app is not crashing its just forced to restart by iOS with new privacy settings. So when you change the privacy policy, app will be killed if its attached to debugger else it will restart or relaunch.

Note : If the user at some point changes the Address Book, Calendars, Reminders, Camera, or Photos permissions, iOS will SIGKILL the app. (It's not crash it's default behaviour of iOS)

Crash when Calendar permission changes outside iOS app

It is an expected behaviour for iOS, when you change its permissions in settings. If the app was opened, the system will send "Message from debugger: Terminated due to signal 9" and the user has to start app manually again.

And I believe there are many similar questions on SO.
Like this: App crashes in background while changing permission - swift

__CRASHING_DUE_TO_PRIVACY_VIOLATION__

I had to add a string for NSCameraUsageDescription in the plist because user is allowed to take photos.

Having app restart itself when it detects change to privacy settings

You misunderstand what is happening. Your app is not crashing (though it may appear so if you are running the app with the debugger).

When you switch to the Settings app (and your app is suspended in the background) and change the privacy settings, suspended apps are terminated. When you switch back to your app, it is simply started again. This is no different than your app being killed for any other reason.

It is up to you to code your app to handle this by restoring its previous state. The other app you talk about is simply returning the user to the previous state. Many apps do this. It has nothing to do with being killed due to privacy changes. The app would restore state when being killed for any reason.

Watch App get killed while allowing/disallowing camera permission on iPhone App

Your app is not crashing its just forced to restart by WatchOS with new privacy settings. So when you change the any permission in iPhone then it means privacy policy changed, so app will be killed if its attached to debugger else it will relaunch. its happing on both Apple Watch and iPhone. if you change the permission in Apple Watch iOS app will restart. if you change the permission in iOS app Apple Watch app will be restart.

Also, Not only camera permission If the user at some point changes the Address Book, Calendars, Reminders, Camera, or Photos permissions, WatchOS app will SIGKILL the app when change App permission in iPhone. (it's default behaviour of iOS and WatchOS)

Please refer the below links

App killed by SIGKILL when changing privacy settings ,
https://developer.apple.com/forums/thread/64740,
App crashes in background while changing permission - swift,
App crashed in iOS 6 when user changes Contacts access permissions

App is forced to restart by iOS with new privacy settings

This is not a problem of your application. Its just the way apple designed iOS. iOS will terminate the application when user change certain permissions of it.

Actually you will get a SIGKILL message but no Crash log when toggling settings. In this situation even applicationWillTerminate not get called!

So the answer is you can't fix it.

Look at page 24 of this slide



Related Topics



Leave a reply



Submit