5

iOS 10 requires you to have key in info.plist for each usage. When trying to submit app to iTunes I got an error.

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.

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.

NSCameraUsageDescription is from card.io, but what could the NSPhotoLibraryUsageDescription be from? Is there a way to know?

I'm using xamarin but I guess that doesn't make a difference.

EDIT: I know that you need to add key to info.plist, what I don't know is why do I need it because I'm not using photo library anywhere

Community
  • 1
  • 1
Medo
  • 968
  • 1
  • 11
  • 26
  • Check this : http://stackoverflow.com/questions/38236723/ios-10-error-access-private-when-using-uiimagepickercontroller – Janmenjaya Oct 07 '16 at 13:22
  • 2
    I also got the `NSPhotoLibraryUsageDescription` error and am not referencing anything related to photos or images or anything like that. Nonetheless I added a very generic sounding usage description and was able to get through. – hvaughan3 Oct 07 '16 at 14:06
  • 1
    Yes, but I have no idea why I need photo library, I'm not using it anywhere – Medo Oct 07 '16 at 14:18
  • 2
    @Medo you have 3rd party libraries or some *.m file in your project that must be using options to open photo album or camera. Apple now knows what apis you are using in your code whether you are actually using them or not. – Sam B Oct 07 '16 at 14:26
  • We're in the same situation. Card-io displays the NSCameraUsageDescription warning, but we can't force the NSPhotoLibraryUsageDescription warning anywhere... – Ferran Maylinch Oct 11 '16 at 17:12
  • I got the same problem in 2 different projects, I think it is an iOS10 bug – Daniel Oct 20 '16 at 09:47
  • Some 3rd party framework must be using privacy-sensitive data. Similar issue has been discussed in https://stackoverflow.com/q/39589998/5866353 – Sharath Kumar Mar 01 '18 at 03:49

3 Answers3

2

You need NSPhotoLibraryUsageDescription if you're implementing a share sheet that includes the option to save an image (which goes to the "Camera Roll"). You may have implemented (or be using) a data source that can produce data in .JPG, .PNG, .TIF form. Prior to iOS 10 your user would have been asked for access to the Photo Library (or Camera Roll). Now, if they do so without your app providing a usage description (like "This app needs to be able to share an image in your Camera Roll."), your app crashes.

JBJr
  • 109
  • 2
  • 7
0

Open your app's plist file and add the key NSPhotoLibraryUsageDescription like so:

enter image description here

Make sure you include a description as to why the app needs the photo library.

Kex
  • 8,023
  • 9
  • 56
  • 129
0

Maybe it's used in some framework.