Hi, I would like to check if the user is using an iPhone 4 or not. How can I do that ?
Thanks ! Sebastian
Hi, I would like to check if the user is using an iPhone 4 or not. How can I do that ?
Thanks ! Sebastian
To detect the difference between the iPod Touch and the iPhone, we use
if(![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
There might be something similar to check for a the forward camera.
Apple specifically recommends against this, instead preferring that you check for individual features and act according to these. This makes your life a lot easier when Apple releases new hardware; if for instance Apple releases an iPod Touch with a camera, and you need a camera for your app, your users wont be upset that it tells them "No camera found" when it does have one, all because it reports as not an iPhone. Here is one way to require all the differentiating hardware features. Do not use these for enabling/disabling features that are supported but not required: this can be determined at runtime through the APIs used to interact with that feature.
UIDevice (see here, also the docs) can help you determine if it is an iPhone, but again, don't do this.