Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 10 usage descriptions

Tags:

ios

xamarin

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

like image 218
Medo Avatar asked Oct 29 '22 19:10

Medo


1 Answers

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.

like image 129
JBJr Avatar answered Nov 15 '22 05:11

JBJr