40

Update:
I attempt to add a String value to the "NSPhotoLibraryUsageDescription" key.
enter image description here

And it works.My build version is now available on my TestFlight.

enter image description here ps: 构建版本 means Build Version

But I want to know why Apple Store just let me add String value for "NSPhotoLibraryUsageDescription" key rather than "Camera Usage Description" or "Location When In Use Usage Description"? And how to localize the info.plist.


Old:
I've uploaded many build versions to iTunes Connect.But TestFlight shows none of these build versions.
Then I search this issue on stackoverflow. And I know this is caused by usage description. I add the NSPhotoLibraryUsageDescription in my Info.plist. However, Apple Store team email and tell me that:

Dear developer,

We have discovered one or more issues with your recent delivery for "Family Health Tracker". To process your delivery, the following issues must be corrected:

This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,

The App Store team

They still tell me add NSPhotoLibraryUsageDescription

This is my Info.plist

X.Jian
  • 2,080
  • 2
  • 14
  • 23
  • 17
    Thanks Apple - I love re-archiving and re-uploading my entire application to put in one string. It even made me update the build number. Just put this on the iTunes Connect GUI where it should be – ski_squaw Sep 22 '16 at 02:37
  • Possible duplicate of [App rejected due to missing usage descriptions (Xcode8)](https://stackoverflow.com/questions/39415895/app-rejected-due-to-missing-usage-descriptions-xcode8) – Mitul Marsoniya Oct 25 '17 at 07:32

7 Answers7

29

Localizing of info.plist file may be very unuseful, especially if you use many languages in your apps. The simplest way for localizing NSPhotoLibraryUsageDescription, NSLocationWhenInUseUsageDescriptionor NSCameraUsageDescription keys is to describe it in InfoPlist.strings file.

  • Create new *.strings file with name InfoPlist;
  • Press Localize... button in file inspector and choose the default language;
  • Add new records in your new InfoPlist.strings file. For example in English:

NSLocationWhenInUseUsageDescription = "Location usage description";

NSPhotoLibraryUsageDescription = "Photos usage description";

NSCameraUsageDescription = "Camera usage description";

For more information Apple docs

Community
  • 1
  • 1
CFIFok
  • 846
  • 8
  • 15
7

Make sure that "NSPhotoLibraryUsageDescription" has value assigned before uploading the app to iTunesConnect.

enter image description here

Viktor Malyi
  • 1,913
  • 2
  • 21
  • 35
  • I have it and yet when I uploaded the build I got an email from the App store team. So weird – Vinod Sobale Sep 15 '16 at 18:35
  • what kind of value it should be there? and where is will be displayed for the user? – Ashoor Sep 18 '16 at 22:24
  • 3
    it's a string type value. And it will be displayed at the first time app asking for photo authorization.@Ashoor – X.Jian Sep 19 '16 at 01:27
  • 1
    Ashoor: the exact text displays to the user as the smaller description that helps a user understand why your app is asking for permission. So, be polite, concise and professional. Include your app's name first, so perhaps something like: "MyGreatApp requires access to your Photos to allow you to add selected photos to a blog in the app." – drew.. Oct 10 '16 at 16:26
4

Simply add these lines to your info.plist file

<key>NSPhotoLibraryUsageDescription</key>
<string>Photo Library Access Warning</string> //For NSPhotoLibraryUsageDescription issue.
Deepak Chaudhary
  • 1,555
  • 1
  • 13
  • 27
2

To localize the Info.plist:

  • Click your Info.plist
  • Show your Utilities, then click File inspector
  • This is a button Localize, click it.
1

I had the same problem with two applications, the solution shows you the itunnes connect via mail: info.plist review your file and tries to add the following fields:

  Privacy - Photo Library Usage Description

  Bluetooth Sharing - NSBluetoothPeripheralUsageDescription

each with a text explaining the reason for its use. You can check here the permissions that now requires iOS 10 in its info.plist here: https://blog.xamarin.com/new-ios-10-privacy-permission-settings/

This worked for me.

1

Try this it work for us,

<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires access to the photo library.</string>

For more details please refer Best Answer

Hope this will help for some .

Community
  • 1
  • 1
Jaywant Khedkar
  • 4,939
  • 2
  • 35
  • 49
0

The missing keys are related to some APIs requiring some usage descriptions defined in the .plist keys. Before adding any keys if you know that your app doesn't make any specific usage I will recommend you take a look at this official guide from Apple to identity faulty API classes. As an example I simply have a comment out on a line containing UIImagePickerController. This was enough to get the binary rejection from Apple; while I didn't access to the user photo library. Once you validated this step you can go ahead with other solutions mentioned here.

tiguero
  • 11,171
  • 5
  • 41
  • 61