VR app crashed on iOS 17.02 - attempted to access privacy-sensitive data without a usage description

macOS Ventura 13.6
Unity 2022.3.10f1
Xcode 15
iPhone13, iOS 17.02
Android 13

My VR iOS app crashed with message below on Xcode when clicked the upper right corner Settings icon, trying to scan 2D barcode to adjust the cardboard types of headset.

9381773--1312142--upload_2023-10-1_18-10-7.png

Xcode message when the VR app crashed upon Settings icon tapped:

9381773--1312139--upload_2023-10-1_18-2-51.png

However, it is running fine on Android 13.

Please advise.

Just found the answer under Xcode,

  • Click on project name “Unity-iPhone”
  • Click “Info” tab
  • Click the up/down of the first Key “Bundle name” and select “+” to add a new key.
  • Click on the new key up/down to scroll down the list and select “Privacy - Camera Usage Description”
  • Key in $(PRODUCT_NAME) needs camera access to scan QR code.
  • DONE.