Sunil Targe
Sunil Targe

Reputation: 7459

Can we keep description empty in info.plist for key NSPhotoLibraryAddUsageDescription?

While adding NSPhotoLibraryAddUsageDescription key into info.plist just to avoid crash issue, Can we keep description empty?

Because native popup description is also seems related info, So I don't want to add another more text.

Does Apple will allow this?

Upvotes: 1

Views: 861

Answers (2)

DGoogly
DGoogly

Reputation: 329

Usage description will be displayed as a message in App Permission Alert which is shown to user whenever Camera/Photo/Contacts is used for the first time.

From iOS 11.x we must provide the usage description. Else Apple will reject the app submission.

And this is the message from Apple when you miss the usage description: "Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data."

Upvotes: 1

Michael Hulet
Michael Hulet

Reputation: 3499

From the documentation (emphasis mine):

Important: To protect user privacy, an iOS app linked on or after iOS 10.0, and that accesses the user’s photo library, must statically declare the intent to do so. Include the NSPhotoLibraryAddUsageDescription key (in apps that link on or after iOS 11) or NSPhotoLibraryUsageDescription key in your app’s Info.plist file and provide a purpose string for the key. If your app attempts to access the user’s photo library without a corresponding purpose string, your app exits.

In other words, no, you must provide a reason about why you require access to the photo library. Otherwise, iOS will kill your app

Upvotes: 2

Related Questions