Apple recommends not searching for hardware version, but for the specific feature in which you are interested.
So how may I detect if there is a front camera on the device to be able to disable some features ?
[UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]
only tells that there is a camera somewhere.
When your iPhone's camera is active a little green dot appears at the top of the screen. This indicator is hardwired to the camera so it cannot be turned off by software.
Replacing the front camera alone does not affect the function of the Face ID, while Face ID will be disabled when replacing the full front camera assembly. Before attempting the actual replacement, a new camera should be plugged in and tested in order to verify that this repair will fix the problem.
On iPhone 12 models, the Scene Detection setting can identify what you're taking a photo of and apply a tailored look to bring out the best qualities in the scene. Scene Detection is on by default. To turn off Scene Detection, go to Settings > Camera, then turn off Scene Detection.
The iPhone 14's front camera is also expected to have a larger f/1.9 aperture. For comparison, the iPhone's front camera remains pretty much the same since iPhone 11, when Apple introduced a new 12-megapixel lens with f/2.2 aperture.
Try this method of UIImagePickerController:
+ (BOOL)isCameraDeviceAvailable:(UIImagePickerControllerCameraDevice)cameraDevice
This is a class method and UIImagePickerControllerCameraDevice can take two values:
UIImagePickerControllerCameraDeviceRear
UIImagePickerControllerCameraDeviceFront
Example code:
if( [UIImagePickerController isCameraDeviceAvailable: UIImagePickerControllerCameraDeviceFront ]) { // do something }
Note that this is available for iOS 4.0 and later.
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