Application killed by SIGKILL when changing privacy settings

My iOS application accesses the user with photos using ALAssetsLibrary . When I change the privacy settings for the application (Settings → Privacy → Photos), the application will be killed by the system ( SIGKILL ). This is mistake?

+44
ios ios6 assetslibrary
Sep 29 '12 at 11:55
source share
6 answers

I think this is a mistake, or at least poorly documented and unexpected behavior. But it does not crash, it is simply forced to restart. You will receive a SIGKILL message, but not a failure log.

If you are a registered apple developer, you can check out their forums to discuss this issue.

I don't know how to prevent this behavior, but feel free to write an error report using apple. According to rumors, they use duplicate errors as a way to measure the severity of an error. Perhaps you can save the state of your application to restore it upon restart.

+33
Oct 17 '12 at 16:11
source share

This also happens when using the UIImagePickerController. The sequence is as follows:

  • You are showing UIImagePickerController. For the first time, a small warning asks the user for permission to use the photo library. Say the user says no.

  • Everything that the user can do with the selection controller at this point is canceled, so let's assume what happens.

  • You will see UIImagePickerController later. It now contains an unusual message that there is no access to the photo library, but the user can allow access in the settings.

  • The user switches to Settings and provides access to the photo library for this application.

  • The application crashes in the background. It doesn't matter if the user canceled the collector or left it.

I wrote a mistake about this, and I suggest you do the same for your situation. Apple introduced a new privacy system in iOS 6, and obviously the kinks were not developed.

+10
01 dec. '12 at 17:50
source share

Find the word "kill" in this PDF file: http://adcdownload.apple.com/wwdc_2012/wwdc_2012_session_pdfs/session_710__privacy_support_in_ios_and_os_x.pdf

iOS kills applications when changing certain permissions.

This information is difficult to track. This is not in any of the guides (for example, the preference programming guide).

+7
Nov 23 '15 at 17:47
source share

Several times, a SIGKILL error works like an interrupt error, it gives an iOS signal that you must restart the application and at the same time we control the tasks of the application, in which case the method of sending the interrupt message is not processed by the application.

In my case ..... I do not allow access to photos and cameras in the application, and whenever I allow access to these functions, I minimize the application and enable these settings. Since I turned them on, iOS receives an interrupt, and the application receives this, but cannot process and cause the application to terminate or close.

+1
Nov 14 '15 at 10:01
source share

When you test your application with a simulator. Changing application permissions gives you a breakpoint. You can enter "c" in the console so that the application continues to work and returns to its original state. But in your real device, this is not a story. Just reload the app.

+1
Nov 30 '15 at 3:25
source share

OK, my first time to write an answer. I hope I'm right :)

Do you access the asset library using assetForURL: resultBlock: failureBlock :?

If you are then most likely you are not processing the ALAssetLibrary fault block.

You can do something like

 ALAssetsLibraryAccessFailureBlock failureBlock = ^(NSError *error) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Access to Photo Library is Denied " message:@"Please allow <YOUR APP NAME> to access your Photo library from Privacy Settings" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; } 

Therefore, when your application does not have access to the photo library, it will ask the user to do this.

0
Oct. 14 '12 at 14:26
source share



All Articles