I am trying to capture both telephoto and wide-angle cameras on the iPhoneX at the same time. This is how I initialized the device:
let captureDevice = AVCaptureDevice.default(.builtInDualCamera, for: .video, position: .back)
and I requested the delivery of two photos for AVPhotoOutput:
let photoSettings = AVCapturePhotoSettings()
photoSettings.isDualCameraDualPhotoDeliveryEnabled = true
capturePhotoOutput.capturePhoto(with: photoSettings, delegate: self)
However, I ran into this error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCapturePhotoOutput setDualCameraDualPhotoDeliveryEnabled:] Dual Camera dual photo delivery is not supported in this configuration'
Are there any additional settings that need to be turned on or off?
source
share