2

I am trying to save photos to Photo Library from my app. While saving I am checking whether user has given permission to do so, otherwise I am asking the user to go to Settings and turn on the permission. Only if the permission has been given only, I am saving the photos. For this I am using PHPhotLibray's requestAuthorization() method and NSPhotoLibraryUsageDescription key in my app's Info.plist.

Because of these checks that I do in my app, there is no chance of crash even if I don't add NSPhotoLibraryAddUsageDescription key in app's Info.plist. But my concern is whether it will be rejected during the App Store Review?

  • 1
    Welcome to Ask Different :) Any specific reason you want to skip on adding this key to your app's Info.plist? – Nimesh Neema Apr 26 '19 at 8:51
  • @NimeshNeema Even though the key is not there, it doesn't crash as we are trying to save only after checking whether user has given permission using PHPhotoLibrary. Its considering NSPhotoLibraryUsageDescription value. So I thought whether to add NSPhotoLibraryAddUsageDescription if its not being used. – iOSManiac Apr 26 '19 at 9:55
  • You need to consider if there is any harm or performance penalty in adding the key? There's none. Also, it's better to have the key there and have peace of mind that your app will have greater chance of getting approved than not having it in the first place :) – Nimesh Neema Apr 26 '19 at 9:57
  • Thats true... Thanks for your response :) @NimeshNeema – iOSManiac Apr 26 '19 at 10:02
  • Welcome. I have updated the answer and added some more information and notes to help you with the decision. – Nimesh Neema Apr 26 '19 at 10:04
0

The Apple Developer documentation for NSPhotoLibraryAddUsageDescription key says:

Discussion

Important

This key is required if your app uses APIs that have write access to the user’s photo library.

So, yes, it's possible that for the app to get rejected in the absence of the key. If the app happen to crash during the review process due to the absence of the key (or for some reason we don't know how the SDK works internally), it may get rejected.

Per, this answer on Stack Overflow:

From the question:

This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryAddUsageDescription key with a string value explaining to the user how the app uses this data.

From the answer:

Obviously, to solve this crash you have to add the NSPhotoLibraryAddUsageDescription into the application's plist file:

<key>NSPhotoLibraryAddUsageDescription</key>
<string>Our application needs permission to write photos...</string>

As property list view:


Note: It's better to adhere to Apple's guidelines and include the key in your app's Info.plist. There's no harm/performance penalty by adding the key. In-fact with the key added, there's one less reason for your app to get rejected.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .