2

I'm working on a program that needs to be able to detect whether or not camera hardware is present in the iPad. I assumed that the easiest way to do this was to determine what generation the device was, but if there is a simpler way to detect the hardware that works too. The iPads that this application is being designed for will likely be recently purchased and running on a standard updated version of iOS.

Logan S.
  • 517
  • 1
  • 4
  • 15

1 Answers1

2

Nope You can simply check what device is being used!

For checking all iOS devices:

NSString *deviceType = [UIDevice currentDevice].model;
NSLog(deviceType);

In order to check for a camera

if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera])
    //there is a camera
chaitanya.varanasi
  • 960
  • 1
  • 9
  • 26
  • Will the first choice tell me what generation the device is in addition to which device (ipod, iphone, ipad) the app is running on? – Logan S. Aug 01 '12 at 16:53