arfoundation-samples icon indicating copy to clipboard operation
arfoundation-samples copied to clipboard

How to switch to front Camera in iOS with AR Camera

Open khushaldogpack opened this issue 6 months ago • 4 comments

So I am new to unity and somehow I was able to create an app which uses camera. I am using AR Camera for both android (ARCore) and iOS (ARKit). When I submitted my app to the app store, they rejected by saying this:

Apple has detected that your app includes usage of TrueDepth APIs (i.e., APIs that access facial recognition or depth information from the front-facing camera on iPhones with Face ID). However, during their testing, they could not find any feature in your app that actually uses these APIs.

Now to stop face tracking, I went to AR setting and switched off face tracking and now I am unable to switch to front camera.

Did anyone face the same issue? How did you resolve this?

khushaldogpack avatar Aug 04 '25 13:08 khushaldogpack

Image I got the same rejection. When search 'truedepth' in xcode, there are two lines about TrueDepth. By deleting these code, my app got approved by Apple.

a1469351 avatar Sep 29 '25 01:09 a1469351

@a1469351 Thank you so much. I'll remove these lines and then try resubmitting the app.

khushaldogpack avatar Sep 29 '25 12:09 khushaldogpack

@a1469351 Did you also switch face tracking off? Because I kept my face tracking on and removed these lines you mentioned and the app was still rejected on appsotre.

khushaldogpack avatar Nov 14 '25 15:11 khushaldogpack

Yes, my app doesn't use face tracking. I don't know about that.

a1469351 avatar Nov 22 '25 08:11 a1469351

AR Foundation chooses which camera to use for your app based on the Configuration Chooser: https://docs.unity3d.com/Packages/[email protected]/manual/features/session/configuration-chooser.html. There is a video linked at the bottom of that docs page if you prefer a video explanation.

You might need to implement a custom configuration chooser depending on the features you are requesting. Not all features are supported in all configurations.

I'm going to close this issue but feel free to follow up via Dicussions: https://discussions.unity.com/tag/ar-foundation

andyb-unity avatar Dec 16 '25 22:12 andyb-unity