iOS 10 GM release error when submitting apps "app attempts to access privacy-sensitive data without a usage description" due to GoogleSignIn, AdMob

IosFirebaseAdmobGoogle Signin

Ios Problem Overview


I just started facing this issue with the iOS 10 GM release. I received an email saying:

>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 NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

>Once the required corrections have been made, you can then redeliver the corrected binary.

>Regards,

>The App Store team

I am using google GoogleSignIn. I am not using Firebase, but when installing GoogleSignIn with cocoa pods, I saw in the logs it automatically installed Firebase.

Is there something we can do other than having to define these keys as my app has nothing to do with camera / photos etc and hence I don't want users to think we are using them.

I notice someone else has also faced this issue: https://forums.developer.apple.com/thread/62229

Ios Solutions


Solution 1 - Ios

Here's a link to a complete workaround from Google: https://groups.google.com/d/msg/google-admob-ads-sdk/UmeVUDrcDaw/HIXR0kjUAgAJ

More info at that link, but TL;DR version is you have to add three items to your plist:

<key>NSCalendarsUsageDescription</key>
<string>Advertisement would like to create a calendar event.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Advertisement would like to store a photo.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Advertisement would like to use bluetooth.</string>

Solution 2 - Ios

in iOS 10 you need to add the key mentioned in below image if you are using camera or photo gallery in your appenter image description here

Solution 3 - Ios

In iOS 10 Apple have made it a requirement to define the usage description in the Info.plist for any feature that requires a popup. See http://useyourloaf.com/blog/privacy-settings-in-ios-10/

During the beta program, apps would crash at the time they would show the prompt if the usage description was not set.

It looks like the iTunes Connect validation tools have been changed to look for references in the app to classes that are associated with permission-related objects. If there isn't an Info.plist entry, they reject the binary.

I saw this in one of my own apps where I had an old helper method in a library that detected whether the camera existed or not. Even though the app never called that method, it was being linked into my binary because I did use another method in the same file. That app didn't use the camera and so didn't define the Info.plist entry. And it was rejected. I simply removed my helper method and moved the checks into the other apps that did use it.

However, AdMob seems to have references to the Calendar so an app I have which uses ads, and does not use the Calendar itself, can't be submitted. Thanks Google!

Solution 4 - Ios

You have to permission of Camera in Info.Plist. goto Info.plist and add below code.

Key       :  Privacy - Camera Usage Description   
Value     :  $(PRODUCT_NAME) camera use

See this ref : enter image description here

Solution 5 - Ios

Here is the all Privacy Keys, We need to manually add them into the Info.plist with short description.

•	    Bluetooth Sharing – NSBluetoothPeripheralUsageDescription
•	    Calendar – NSCalendarsUsageDescription
•	    CallKit – NSVoIPUsageDescription
•	    Camera – NSCameraUsageDescription
•	    Contacts – NSContactsUsageDescription
•	    Health – NSHealthShareUsageDescription & NSHealthUpdateUsageDescription
•	    HomeKit – NSHomeKitUsageDescription
•	    Location – NSLocationUsageDescription, NSLocationAlwaysUsageDescription, NSLocationWhenInUseUsageDescription
•	    Media Library – NSAppleMusicUsageDescription
•	    Microphone – NSMicrophoneUsageDescription
•	    Motion – NSMotionUsageDescription
•	    Photos – NSPhotoLibraryUsageDescription
•	    Reminders – NSRemindersUsageDescription
•	    Speech Recognition – NSSpeechRecognitionUsageDescription
•	    SiriKit – NSSiriUsageDescription
•	    TV Provider – NSVideoSubscriberAccountUsageDescription

Solution 6 - Ios

EDIT: Please refer to the answer above https://stackoverflow.com/a/39476283/1634905 which lists the official workaround by google. NOTE that the workaround is missing an additional key which will be required too: NSCameraUsageDescription

Workaround Solution I used: Google's frameworks for AdMob and GoogleSignIn installs firebase automatically which uses such permissions even though the app never does. After I defined NSCameraUsageDescription in the info.plist, it let me submit without problem hoping that the app won't prompt the user ever so they won't see the text either.

Solution 7 - Ios

Is it possible that the Google Framework uses some additional system framework that require the user permission (i.e., the user position) and you forget to add the related description in the .plist file! Double check that.

Some of the usage permission description became mandatory in iOS 10.

Solution 8 - Ios

Fixed on 7.11.0 https://firebase.google.com/docs/admob/release-notes

Make sure you update the SDK

Solution 9 - Ios

Make sure you're adding this key if you're ESRI's ArcGIS.framework.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsudoExclaimationExclaimationView Question on Stackoverflow
Solution 1 - IoskevcolView Answer on Stackoverflow
Solution 2 - IosPriteshView Answer on Stackoverflow
Solution 3 - IosGeoff HackworthView Answer on Stackoverflow
Solution 4 - IosKirit ModiView Answer on Stackoverflow
Solution 5 - IosKiran KView Answer on Stackoverflow
Solution 6 - IossudoExclaimationExclaimationView Answer on Stackoverflow
Solution 7 - IosGrizzlyBearView Answer on Stackoverflow
Solution 8 - IosayalcinkayaView Answer on Stackoverflow
Solution 9 - IosMariusView Answer on Stackoverflow