Reputation: 391
I am reading the "Device Support - Setting Required Hardware Capabilities" on http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedFeatures/AdvancedFeatures.html
I want to add still-camera capability by doing the following:
Is this the correct way?
Thanks in advance for your help.
Upvotes: 3
Views: 2961
Reputation: 4947
You don't necessarily need to set up UIRequiredDeviceCapabilities as a dictionary. It can also be an array. You use a dictionary if some of your options need to be YES and some need to be NO. If you're just trying to set capabilities you require, using an array can be a little simpler.
See "UIRequiredDeviceCapabilities " at https://developer.apple.com/library/ios/#documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html
Upvotes: 1
Reputation: 391
Someone at the Developer Forum answered my question.
At the Raw Values/Keys mode
At the "friendly" (Uncheck Raw Values/Keys) mode
Upvotes: 1
Reputation: 16275
If you only want to have the capability to utilize the still camera, you don't have to do anything, except check that the camera exists at runtime:
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
//Something
}
This is the correct approach, if your application has utility, even when run on a device without a camera. If, on the other hand, your App needs the camera in order to function, then changing the plist is the correct approach, as this is a signal to Apple that your App can not be used on a device without a camera. In that case the procedure you outlined is correct.
Upvotes: 3