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 ?