In my Xcode project there is Info.plist
file in resources. It has an attribute like this:
LSRequiresIPhoneOS
So my question is: do I have to check that? What I want is that my app finds out itself weather there is a camera or not. If not, the feature is disabled, and if yes: Cool! It must work on both iPhone and iPod Touch!
I guess that if I disable this in Info.plist
, I can still use iPhone features, and Apple will not refuse my code because of that, right?
You should leave LSRequiresIPhoneOS checked (which is the default value). This does not prevent the app from running on the iPod Touch. It may seem confusing, but in this case "IPhoneOS" is referring to the OS that runs on both the iPhone and the iPod Touch (assuming the user has installed iPhone OS on the Touch so that it can run 3rd-party apps).
Regarding camera usage, you can use something like the following to specifically see if the camera is available:
BOOL isCameraAvailable = [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera];
This kind of approach--checking for specific functionality--is usually better than using the iPhone OS version or hardware model.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With