I\'m writing an iOS app, and I need to be able to detect if the device has a camera. Previously, I would check if the device is an iPhone or not, since only the iPhone has a
If you are using the AV Foundation classes instead of UIImagePickerController you can do:
BOOL hasCamera = ([[AVCaptureDevice devices] count] > 0);
If you are using UIImagePickerController it probably isn't worth it, since you'd have to add AVFoundation.framework to your project.