I'm use phonegap to build ios app, after I tried to submit app via iTunes Connect, I got following message.
**Missing Info.plist key** - 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.
But My app just calling back-end API, I don't use iPhone's Photo Library, I do display html image tag and data is from API.
So is there a setting to disable the usage iPhone Photo Library at Xcode? I'm guessing that could fix my issue.
Related
I am trying to build an ionic cordova app for IOS (we have only used android builds on this project until now), I have added the IOS platform from scratch, built in cordova, then opened the Xcode project, built, archived and uploaded. but then i get emailed an error regrading missing entries into my info.plist for "NSMicrophoneUsageDescription" and "NSSpeechRecognitionUsageDescription".
So i went and added the two records with an explanation for their use in my apps info.plist
<key>NSMicrophoneUsageDescription</key>
<string>The app uses speech to text input to capture notes, this requires microphone access</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>The app uses speech to text input to capture notes, this requires speech recognition use</string>
I have verified that those records end up in the built files info.plist that i then try uploading, but i still get the rejection email.
I thought it may need to be in the info.plist file of the API that requires those permissions, but even after adding the same values there i still get the rejection emails.
I have tried uploading from Xcode after the archiving finished and taking the Xcode archive, browsing inside it, getting just my .app, adding to a folder called Payload, compressing and renaming it to .ipa and uploading that to apple, with the same response.
Is there some file naming or folder structure that i am missing when i upload my files, i have checked that they all have the records that apple is asking for in all info.plist files but i still get the exact same rejection email when uploading
EDIT: the rejection email from apple
"
Dear Developer,
We identified one or more issues with a recent delivery for your app, "XXXX" 7.XX (7.XX). Please correct the following issues, then upload again.
ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSMicrophoneUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).
ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSSpeechRecognitionUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).
The App Store Team
"
First, you need to clear your derived data.
set your deployment target to 9.0 or lesser maybe, when you change your target Xcode resets your info.plist.
prepare your Cordova application using the command : cordova prepare
once you prepared your application goto "-Info.plist" file and add the below description.
<key>NSMicrophoneUsageDescription</key>
<string>The app uses speech to text input to capture notes, this requires microphone access</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>The app uses speech to text input to capture notes, this requires speech recognition use</string>
archive your application and uploadd to appstore. you will not get rejection.
No feature is added related to FaceID detection. I have not added
LocalAuthentication.framework
in my application. I am using passcode for user authentication for my application. One of my client using faceID to unlock the screen, reported an issue that after unlocking the screen using faceID app is getting crashed.
I checked the issue in simulator as iPhone X is not available with me. I followed the following step to reproduce issue.
Hardware -> FaceID -> Enrolled.
I got following log in console.
This app has crashed because it attempted to access privacy-sensitive
data without a usage description. The app's Info.plist must contain
an NSFaceIDUsageDescription key with a string value explaining to the
user how the app uses this data.
As I mentioned earlier, I have not implemented any code to detect faceID then why I am facing above issue?
Your application will only crash on an actual device, if FaceIdUsageDescription is missing.
I would recommend you to add the FaceIdUsageDescription to the plist, as LocalAuthentication.framework will automatically authenticate with FaceID if device supports it and you application supports Biometrics(even TouchID).
I have seen these issue with already published banking application on AppStore. Adding the privacy policy to the plist will do the trick.
Important: To protect user privacy, an iOS app that links on or after iOS 11 and that would access Face ID if the hardware supports it, must statically declare the intent to do so. Include the NSFaceIDUsageDescription key in your app’s Info.plist file and provide a purpose string for this key. If your app attempts to access Face ID without a corresponding purpose string, your app may exit.
This key is supported in iOS 11 and later.
Documentation Reference
I am not using UIImagePicker in my app and not accessing the Photo Library. I got a mail regarding add NSPhotoLibraryUsageDescription in info.plist file.
I have following questions
How to confirm my project accessing the photo library?
I already searched UIImagePicker in my project and did't get any result.
Is it mandatory to add NSPhotoLibraryUsageDescription in info.plist while i am not accessing the photo library?
Can any one help to find it out .
Thanks
UIImagePicker
An image picker controller manages user interactions and delivers the results of those interactions to a delegate object. The role and appearance of an image picker controller depend on the source type you assign to it before you present it.
whenever you used UIImagePicker, you have to give permission for that particular application
There is a list of all Cocoa Keys that you can specify in your Info.plist file:
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html
(Xcode target -> Info -> Custom iOS Target Properties)
iOS already required permissions to access microphone, camera, and media library earlier (iOS6, iOS7), but since iOS10 the apps will crash if you don't provide the description why you are asking for the permission.
UPDATE:
Summary of all privacy keys (with example description):
Useful Link
You only have to add this key-value pair to your info.plist if you are actually accessing the photos any way. If it's not added the app is going to crash.
Check if any of your added dependencies using UIImagePicker.
No it's not mandatory to add NSPhotoLibraryUsageDescription key in info.plist. If your App is not using accessing photo from library/gallery then you should remove it. But as "#Bence Pattogato" said if Your app accessing photo from library/gallery and there is no key added in info.plist then it will be crash.
For your information below are different keys that required to add info.plist if you accessing relevant features according to camera/photo library.
1) NSPhotoLibraryUsageDescription : This key lets you describe the reason your app accesses the user’s photo library. When the system prompts the user to allow access, this string is displayed as part of the alert.
2) NSCameraUsageDescription : describes the reason that the app (including an iMessage app) accesses the device’s camera. When the system prompts the user to allow access, this string is displayed as part of the alert.
3) NSPhotoLibraryAddUsageDescription : (New in iOS 11) This key lets you describe the reason your app seeks write-only access to the user’s photo library. When the system prompts the user to allow access, this string is displayed as part of the alert.
Above information get from this Appel official link.
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
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.
Open your app's plist file and add the key NSPhotoLibraryUsageDescription like so:
Make sure you include a description as to why the app needs the photo library.
Maybe it's used in some framework.
I want to upload my app to iTunes connect but after uploading I always get an error message by mail from iTunes, that after their scan some description variables are missing.
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.
I am using both features, so that's ok, BUT: i already added those variables to my localized infoPlist.strings. And these seems to work, because in the Simulator and my iPhone, both strings are displayed correctly in the system dialogs. I didn't add the strings to the plist.info file, because I specified them in the localized file, which should be ok. The plist.info and also the localized file are both packaged in the app, I already head a look using Finder.
Is there anything else I must add? Do I still need to add them to the plist.info file, although they are in the localized file?
Additional info: I am using the latest XCode 8 GM build on macOS Safari.
Are you using AdMob? If so the answer is that Google confirmed that it is an issue with the AdMob SDK. You can read about it here.
The solution is, to add the keys also to the PList.info file, not only to the localized infoPlist.strings file.
This is a bit inconsequent because within the simulator and on my phone every message is displayed correctly. But now my app was accepted.