BarcodeScanner icon indicating copy to clipboard operation
BarcodeScanner copied to clipboard

check camera is supported

Open khaledannajar opened this issue 11 years ago • 1 comments

In this class: CaptureBarcodesViewController I get this error: Uncaught Exception: *** Can't add <AVCaptureDeviceInput: 0x6eb330 [(null)]> because the device does not support AVCaptureSessionPresetMedium. Use -[AVCaptureDevice supportsAVCaptureSessionPreset:]. 2014-07-08 17:03:23.075 XXXXXXXXYYYY[2439:707] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* Can't add <AVCaptureDeviceInput: 0x6eb330 [(null)]> because the device does not support AVCaptureSessionPresetMedium. Use -[AVCaptureDevice supportsAVCaptureSessionPreset:].'

I

khaledannajar avatar Jul 08 '14 15:07 khaledannajar

I fixed that by adding a check that the device has a camera as some versions of iPad does not have a camera.

khaledannajar avatar Jan 24 '15 23:01 khaledannajar