Contents

ARError.Code.cameraUnauthorized

An error that indicates the app lacks user permission for the camera.

Declaration

case cameraUnauthorized

Discussion

To use the device’s camera:

  • Your app’s Info.plist file must provide a message for the NSCameraUsageDescription key. If this key is missing, any attempt to run an AR session fails with this error.

  • When your app first attempts to run an AR session or otherwise use the camera, iOS automatically shows an alert with your camera usage description message, asking the user to grant camera permission to your app. If the user accepts this request, the session begins; otherwise the session fails with this error.

  • If the user has previously denied camera permission for your app, all attempts to run an AR session or otherwise use the camera fail with this error. To grant camera permission, the user must explicitly enable your app in the iOS Settings app, under Privacy > Camera.

See Also

Errors