iosswiftpermissionsswift4photolibrary

App is not asking for Photo Library usage permission


I have added Privacy - Photo Library Additions Usage Description & Privacy - Photo Library Usage Description.

enter image description here

But none of the keys is asking for user permission to access the photo library.

I have tested in Simulator as well as in real device.

I even tried by adding a single key at a time. Like only Privacy - Photo Library Additions Usage Description or Privacy - Photo Library Usage Description. And also tried by adding both the keys together.

But none of the above scenarios is working for me.

I also added Privacy - Camera Usage Description and that's working perfectly fine. But photo library usage is not asking for user's permission

Any help is appreciated!


Solution

  • Note from Apple:

    When using the UIImagePickerController to bring up the user's photo library, your > app doesn't need to request permission explicitly.

    After iOS 10, if your app is using PHAsset, PHPhotoLibrary, and PHImageManager, then you need to include NSPhotoLibraryUsageDescription in app's Info.plist file.

    Detail info is available here: apple-ref-documentation