vhesener / Closures

Swifty closures for UIKit and Foundation
MIT License
1.74k stars 146 forks source link

App Store rejection for not including NSPhotoLibraryUsageDescription #41

Closed bhulkuKs closed 5 years ago

bhulkuKs commented 6 years ago

I have no use of user's photo library into my app yet my app got rejected. I created a build of my app and submitted it to iTunes Connect and got the following rejection a few minutes later in an automated email: 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. I was able to track down the cause of the rejection to this method into UIImagePickerController.swift file: public convenience init(source: UIImagePickerControllerSourceType = .photoLibrary, allow: UIImagePickerController.MediaFilter = .image, cameraOverlay: UIView? = nil, showsCameraControls: Bool = true, didCancel: @escaping ( _ picker: UIImagePickerController) -> Void = dismissFromPresenting, didPick: @escaping (_ result: UIImagePickerController.Result, _ picker: UIImagePickerController) -> Void) {... I take it that an app that makes any UIImagePickerController call (even if it’s not actually requesting access to the user’s photo library) must include an entry for NSPhotoLibraryUsageDescription in its Info.plist.

vhesener commented 6 years ago

Good find. This is high priority. Will have some sort of fix shortly.

vhesener commented 6 years ago

@bhulkuKs As an immediate work-around to have your app submission go through, you can put the following description for Privacy - Camera Usage Description:

A 3rd party library offers a convenience extension for UIImagePickerController, but no user's photos are being used in this application.

This should suffice because they are more concerned with you knowing how sensitive data is being used. This satisfies the requirement to

provide a transparent and meaningful usage description.

I will leave the issue open until a more robust solution is released.