Auto device for both positions unsupported, returning Auto device for same position anyway (BackAuto) - error while open camera iOS swift
Problem:
While try to open camera in my app it shows that below error.
Auto device for both positions unsupported, returning Auto device for same position anyway (BackAuto
func openCamera() {
let authStatus = AVCaptureDevice.authorizationS
switch (authStatus){
case .notDetermined:
showAlert(msg:"Camera access denied", controller: self)
case .restricted:
showAlert(msg: "Camera access denied", controller: self)
case .denied:
showAlert(msg: "Camera access denied", controller: self)
case .authorized:
if getCameraAccess() == true{
DispatchQueue.main.async() {
if(UIImagePickerController .isSourceTypeAvailable(UIImage
self.imagePickerController.sou
self.imagePickerController.del
self.imagePickerController.med
self.present(self.imagePickerC
}
}
}
else{
showAlert(msg: "Camera access denied", controller: self)
}
@unknown default:
break
}
}
Comments
Post a Comment