Why does Apple think my Unity project is trying to access the camera?

“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 feel like adding that key with the explanation of “This app does not use the camera” is not the correct solution… But I have no idea what could be seeming to use the camera.

It’s a 2D Unity project. I’m updated to the latest of everything. I’ve written every line of code myself. I save & load four ints that I use as bitfields for persistent settings. I’m not using any services. (No ads, no in-app purchases, ect…) The only asset I’ve gotten from the asset store is a wav file. The app is fullscreen only and only supports the portrait and portrait upside down orientations. I set my export to 64 bit and iOS 8.0 or later.

My Google and Unity Answers searches haven’t revealed any solutions. I have no starting point to debug from…

The rest of the code is fairly simple… What else can I look at?

I have released several iOS builds that do not use the camera with Unity 5.5.0f3, but upgrading to 5.5.0p4 causes this rejection when uploading the binary.

In terminal I ran:
diff ./MyXcodeProjectOld/Classes ./MyXcodeProjectNew/Classes > diff1.txt
diff ./MyXcodeProjectOld/Classes/Unity ./MyXcodeProjectNew/Classes/Unity > diff2.txt

and look what changed in /MyXcodeProjectNew/Classes/Preprocessor.h

set that to 0, increment build number, clean, archive, submit, success!

Just found an open issue for it too, which you all should vote on:

having the same problem, this is very frustrating, please let me know if you find a solution

I am also seeing this in a test project with one scene and one script that rotates a cube, all default build setting.

Same here, got rejected because of this. Hoping for an update or a clean solution.

I have the exact same issue. I thought that this is caused by some of plugins I used in my project, but then I made EMPTY unity 2D project and upload it to the app store. I got rejected immediately.

Please FIX this!

EDIT: In Unity 5.5 this error is back. Can UNITY Team please fix this shit?? Or at least test it before screwing things over!??

Any resolve on this? Since upgrading to unity 5.5 we have the same issue, we’re not using camera or photos in any way, but we get “invalid binary” when we upload to itunes connect and an email saying that we need to add NSCameraUsageDescription to info.plist. Please help if you can in any way. TIA

I think it’s ScreenOrientation.

Doing a few searches in the exported XCode, I found that the file including camera stuff is UnityInterface.h. This file also has a function that returns the ScreenOrientation… So by asking for the ScreenOrientation, I automatically include CameraCapture.h and therefore CameraCapture.mm is in my project, sitting unused.

I’m going to see if there’s a way to do what I want without ScreenOrientation, but if not, I can at least put something in the pList… “Camera functions are automatically included in projects that check the screen orientation, but I’m not actually using them.”

I’m getting this same issue on Unity 2023.1.10, and keep getting rejected by Appstore review.
No solutions are working for me.

I removed the camera plist entry, but still see CameraCapture is included in the build so suspect it will either fail on device again due to privcay violation or get rejected. Unfortunately I can’t use Testflight at the moment as the app was removed from sale, and Testflight won’t let you download the app in Testflight in this case until it goes back on sale again. Crazy!

Is there a postbuild script solution available to remove all Camera entries in code and plist?

Also raised here: https://forum.unity.com/threads/where-can-i-add-nscamerausagedescription-persmission.445973/#post-9287806


In “Player Settings” for iOS there’s a field called “Camera Usage Description”. Type something funny there and you’re good to go. (remember to increment build before uploading.)

This is an annoying bug.