App killed by SIGKILL when changing privacy settings

后端 未结 6 2002
别跟我提以往
别跟我提以往 2020-11-29 23:01

My iOS app accesses the user\'s Photos with ALAssetsLibrary. When I change the privacy settings for the app (Settings → Privacy → Photos), the app gets killed b

6条回答
  •  感动是毒
    2020-11-29 23:31

    This happens as well when using UIImagePickerController. The sequence goes like this:

    1. You show the UIImagePickerController. The first time, the little alert asks the user for permission to use the photo library. Let's say the user says no.

    2. All the user can do with the picker controller at this point is cancel, so let's presume that's what happens.

    3. On some later occasion, you show the UIImagePickerController. It now contains a noncustomizable message saying that there is no access to the photo library, but that the user can enable access in Settings.

    4. The user switches to Settings and enables access to the photo library for this app.

    5. The app crashes in the background. It doesn't matter whether the user has cancelled the picker or left it showing.

    I've filed a bug on this and I suggest you do the same, for your situation. Apple introduced a new privacy system in iOS 6 and clearly the kinks have not been worked out.

提交回复
热议问题