What is the crash of "The app's Info.plist must contain an NSPhotoLibraryAddUsageDescription"?

Note that although the application info.plist does contains NSPhotoLibraryUsageDescription it still crashes, why?

I think there is a misunderstanding when comparing NSPhotoLibraryUsageDescription and NSPhotoLibraryAddUsageDescription, as documented in Information Property List Key Reference:

NSPhotoLibraryUsageDescription:

This key lets you describe the reason your app accesses the user’s photo library. When the system prompts the user to allow access, this string is displayed as part of the alert.

It is related to letting the app to be able to access (get) the device photos library.

NSPhotoLibraryAddUsageDescription:

This key lets you describe the reason your app seeks write-only access to the user’s photo library. When the system prompts the user to allow access, this string is displayed as part of the alert.

It is related to letting the app to be able to write (add) photos into the device photos library.


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:

enter image description here


There is a typo in the above answer. The correct plist entry should be as follows

<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) needs permission to access photos on your device</string>