tags:

views:

154

answers:

2

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:

  1. Open my Info.plist
  2. Click +
  3. Add UIRequiredDeviceCapabilities on the Key column
  4. Add still-camera on the Value column
  5. Save the updated Info.plist

Is this the correct way?

Thanks in advance for your help.

+1  A: 

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.

Brad Smith
Thanks. I am doing this is part of submission to Apple Store.Minor corrections after steps 3-43 Add UIRequiredDeviceCapabilities with value type=Dictionary on the Key column4 Add another row under UIRequiredDeviceCapabilities 1. Add still-camera with value type=Boolean on the Key column 2. Check the box on the Value column
pion
A: 

Someone at the Developer Forum answered my question.

At the Raw Values/Keys mode

  • Click + sign to add a row
  • Enter UIRequiredDeviceCapabilities
  • XCode recognizes the key and automatically creates an item 0

At the "friendly" (Uncheck Raw Values/Keys) mode

  • Type "Required device capabilities"
  • XCode recognizes it and will auto-complete it
pion