iOS 10 Error on Submit

Just tried to upload our app and got the following errors:


This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription 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 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 NSBluetoothPeripheralUsageDescription key with a string value explaining to the user how the app uses this data.



Just started getting this with the GM Seed and no prior versions. Note that we're not accessing the Calendar, Photo Library, or Bluetooth, so am very confused.


I've also verified we're not linking to the EventKit, EventKitU, Photos, PhotosUI, or to the CoreBluetooth frameworks.


Anyone else seeing this?


rob.

Answered by DTS Engineer in 176847022

Starting with iOS 10, purpose strings are required for access to any protected class of data from within your app, including usage of those protected data classes by any 3rd party library your app uses. If you are receiving a message about a missing purpose string for a data class you don't recognize, consult with your 3rd party library vendors about their usage of that protected data class.


For more detailed information, consult the following resources:

Confirmed that NSCalendarsUsageDescription and NSBluetoothPeripheralUsageDescription are directly related to AdMob. When I remove just AdMob and resubmit, I no longer get a warning about either requirement.

I suspect that referencing the class may be enough to trigger it. I also had just a few references to UIImagePickerController (impossible to reach code), and removing them fixed it for me.

I raised this issue in their Google Groups:


https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/ios/y-IxErXawxg


By the way, are you saying that you did *not* get the bluetooth warning? Did you already have the bluetooth explanation set for another reason?

Accepted Answer

Starting with iOS 10, purpose strings are required for access to any protected class of data from within your app, including usage of those protected data classes by any 3rd party library your app uses. If you are receiving a message about a missing purpose string for a data class you don't recognize, consult with your 3rd party library vendors about their usage of that protected data class.


For more detailed information, consult the following resources:

AdMob will announce about this issue next week. (your post ?)

https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/ios/y-IxErXawxg

Thank you for the precision.


I have the same problem, for NSCalendarsUsageDescription, NSPhotoLibraryUsageDescription, and NSCameraUsageDescription.


I've tried providing localized strings for these keys in InfoPlist.strings of my main app target, but the build is still rejected. I'm using CocoaPods.


Any idea ?


Thanks,


Loïc

PocketCampus.Org,


You should check your binary with nm command.


cd ~/Library/Developer/Xcode/Archives/<YYYY-MM-DD>/<YOUR_APP_NAME><TIMESTAMP>.xcarchive/Products/Applications/<YOUR_APP_NAME>.app/
nm <YOUR_APP_NAME> | grep EKEvent
nm <YOUR_APP_NAME> | grep UIImagePicker

This answer is a joke. We are getting the rejection for NSBluetoothPeripheralUsageDescription and our app does NOTHING with BT. It doesn't open any BT connections, use any peripherals, nothing. It also doesn't seem to have the crashing problem (which you get if you don't request the access properly with iOS 10 SDK) exhibited by others. We use a few 3rd party libraries (the only one I can think that even does communication-level stuff is AFNetworking, but I don't know why it would just trigger this message automatically). We don't use Admob that was mentioned earlier.


We even opened a code-level DTS case (which you have to pay for) on this issue and all they did was direct us here to this non-answer. I suspect Apple has a problem with their Xcode 8/iOS10 SDK submittal tools on their backend, but I can't prove it and if the past is any indication, they'll just quietly fix it and never admit to a problem. We ended up including the plist key and a generic string for it and were able to submit it that way. Not a great solution, but it worked for us.

Sorry, I didn't mean to imply I only got the calendar error. I also got a reference to bluetooth:



This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription 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 NSBluetoothPeripheralUsageDescription key with a string value explaining to the user how the app uses this data.

Your app will have a refence somewhere to bluetooth in order to trigger the validation error. If it's not in your code, then it'll be in one of the 3rd party libraries. A crash would only occur if that code was executed (without an Info.plist entry), but iTunes Connect can't tell if the code will actually be executed, it is just checking the binary to see if there are references to these objects which *could* be executed.


It is frustrating that this validation check has only just been enabled because this issue would have been discovered many weeks ago during TestFlight testing.

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


TL;DR version: Add the following 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>

Thanks for the update. I'd be very interested to hear if this workaround is getting past App Review.

Can't get this to go away even after adding the string and cleaning the build folder. Very annoying.

Thank you; my binary was accepted after making this modification

you can add NSCalendarsUsageDescription, NSPhotoLibraryUsageDescription, etc with explanation why your app use the camera \ celander \ etc, and if your 3rd party library doesn't do that - this will pass App Store review but this sentence won't ever be seen !

iOS 10 Error on Submit
 
 
Q