If we don't add NSPhotoLibraryAddUsageDescription for saving images to Photo library in our app, would it be rejected during App Store review?

apple.stackexchange https://apple.stackexchange.com/questions/358724

  •  30-04-2021
  •  | 
  •  

Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a apple.stackexchange
scroll top