Camera Permissions Popup

We have a very strange issue that I am trying to solve or find the best practice for.

We have a SwiftUI View that uses the Camera to preview. So as suggested in Apples Docs we check authorisation status and then if it's not determined we request authorisation.

We also have the privacy entry in the info.plist

            case .notDetermined:
                AVCaptureDevice.requestAccess(for: .video) { accessStatusAuthorised in
                    if !accessStatusAuthorised {
                        self.cameraStatus = .notAuthorised
                    } else {
                        self.isAuthorized = true
                        self.cameraStatus = .authorised
                        self.startCameraSession(cameraPosition: cameraPosition)
                    }
                }
            case .restricted:
                cameraStatus = .notAuthorised
                isAuthorized = false
            case .denied:
                cameraStatus = .notAuthorised
                isAuthorized = false
            case .authorized:
                cameraStatus = .authorised
                isAuthorized = true
                startCameraSession(cameraPosition: cameraPosition)
                break
            @unknown default:
                isAuthorized = true
                cameraStatus = .notAuthorised
        }

However when we call this code it freezes the Camera feed, even when allow has been tapped.

However and this is the confusing part. If we do not call the code above, we still get the permission for camera access pop up and the camera works fine after allowing.

What im concerned about is changing the code to do this and its a possible apple bug that gets fixed and hey then none of the Apps allow the camera function.

I cannot see any where that the process has changed for iOS 26 / Xcode 26.

Can anyone shed any light on this or had similar experience ?

No idea what you mean by "it freezes the Camera feed", and you don't exactly say how those cameraStatus and isAuthorized variables are used.

I assume the initial value of isAuthorized is false ? You don't show that in the code.

Do you need two variables? It seems:

  • whenever isAuthorized is true, cameraStatus is .authorised;
  • and vice versa, when isAuthorized is false, cameraStatus is notAuthorised.

Except in the last case: @unknown default: where isAuthorized is true but cameraStatus is notAuthorised. Could this be your issue?

Could you use just one variable to cut down on the complexity?

Camera Permissions Popup
 
 
Q