check camera is supported
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
I fixed that by adding a check that the device has a camera as some versions of iPad does not have a camera.