views:

209

answers:

1

I would like to have my app open the camera (presently UIImagePickerController ) front-facing if available. (Iphone SDK).

How can I do that?

+2  A: 

It's right there in the documentation:

picker.cameraDevice = UIImagePickerControllerCameraDeviceFront;

Of course, you'll need to check first if the front camera is actually available.

Ole Begemann
1/2 answer then :-)
Olav
It seems when i set XCode SDK to IOS4 it compile, and it doesn't crash on a device without front camera. It seems the executable can also run on a device where IOS < 4, but I haven't tested all combinations.
Olav
I now get:The Info.plist for application at....specifies a minimum OS version of 4.1, which is too high to be installed on .......
Olav
This is when trying to run on a device where (version <4) after I had to upgrade the SDK to 4.1 because my phone with front-camera were 4.1
Olav