How to check if iPhone has dual camera?
Just as the apple's example:
if let device = AVCaptureDevice.defaultDevice(withDeviceType: .builtInDuoCamera,
mediaType: AVMediaTypeVideo,
position: .back) {
return device
} else if let device = AVCaptureDevice.defaultDevice(withDeviceType: .builtInWideAngleCamera,
mediaType: AVMediaTypeVideo,
position: .back) {
return device
} else {
return nil
}