April 10, 2016

How to Fix iOS SIGKILL App Crash When Returning From Settings

If you have added permission checking on items such as Camera or Photo Library, you may have noticed this issue when testing your app. That is, your app would crash with a SIGKILL upon return from Settings if you make any privacy changes. The screen would freeze and there is nothing we can do… Definitely not something we want.

Turns out that no fix is required for such situation.

Apparently, SIGKILL crash would only happen in XCode / Simulator. If you try to run in on an actual device disconnected from XCode the app would restore correctly.

Taken from rmaddy’s reply on StackOverflow

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.


Hello! My name is Jian Jye and I work on Laravel projects as my main job. If my article was helpful to you, a shoutout on Twitter would be awesome! I'm also available for hire if you need any help with Laravel. Contact me.