0

Does anyone know the recommended way to check whether the device supports specific capabilities, for example the camera. I know I can detect the device the app is on with UIDevice but I was wondering if there is a way to enumerate the device's capabilities?

KenS
  • 93
  • 1
  • 4

1 Answers1

2

I'm not sure if there is a way to enumerate all of the device's capabilities. Usually, this check is done on a capability by capability basis.

So, to use your example, if you would like to know if the device you are running on has the capability to take a picture, you would:

[UIImagePickerController isSourceTypeAvailable:
   UIImagePickerControllerSourceTypeCamera];

This would return true (YES) for any iPhone, and false (NO) for any iPod Touch (at least at the time of this writing).

mmc
  • 17,354
  • 2
  • 34
  • 52