Unable to submit test build due to xcode 8 NSCameraUsageDescription missing key

I was able to submit my build before xcode 8 release, but now, when I archive and upload to the app store (testflight), it doesn’t expose the build and sends me an email with the following content:

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.

The fix is quite simple, I have to write down a message saying how I’m using the device camera with NSCameraUsageDescription in info.plist, but the problem here is I’m not using the device camera (webcam) anywhere in my project.

I searched my project for the word Camera, they all refer to Unity’s Camera. According to Unity, device camera can be used with WebCamTexture API. No trace of this in my project.

I searched for “webcam” and found the following line in Assembly-CSharp-Editor-vs.csproj:


So I’ve created a blank project using Unity and it had a very similar entry with ENABLE_WEBCAM too so I don’t think it’s caused by this. Turns out that a fresh blank project had the same problem too (just received the email).

I’m using Unity version 5.3.4f1 (About to release a game so it would take a really good reason to update) :wink:

Is NSCameraUsageDescription now a required field since xcode 8 release or is it directly related to something I’m using in my Unity project?

So thanks to @conjugategames, since I’m doing most of the build with the command line, here’s the commands I ended up using (only works on MacOS):

/usr/libexec/PlistBuddy -c "Add :NSCameraUsageDescription string" ./Info.plist || true
/usr/libexec/PlistBuddy -c "Set :NSCameraUsageDescription 'not used'" ./Info.plist

It basically uses PlistBuddy to create the NSCameraUsageDescription tag in the Info.plist file (the || true read “or true” makes the command succeed even if the key was already there). The second line sets the value to “not used”.