Detecting Camera Flash with respect to Retina Flash

Number:rdar://26716835 Date Originated:9 Jun 2016
Status:Closed Resolved:
Product:iOS SDK Product Version:iOS 9.3.2
Classification: Reproducible:yes
Your documentations says:

> No separate API iontrols this feature—on supported devices, the AVCaptureDevice hasFlash property reflects the availability of Retina Flash for the front-facing citamera.

I find this is not true. I tested this on my iPhone 6S.

Steps to Reproduce:
_delegate.imagePickerController.cameraDevice = UIImagePickerControllerCameraDeviceFront; 

AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
    if ([device hasFlash]) {
        NSLog(@"device hasFlash - YES");
    } else {
        NSLog(@"device hasFlash - NO");

Expected Results:
> device hasFlash - YES

Actual Results:
> device hasFlash - NO


Closing, no longer reproducible.

By Boris.Yurkevich at April 25, 2023, 8:23 p.m. (reply...)

Boris Yurkevich09-Jun-2016 02:04 PM

Sorry again, hasFlash returns YES for iPod. However, there's no way to determine is Flash available. With iPod Touch case hasFlash returns YES even if I using front camera. isFlashAvailableForCameraDevice returns correct YES, NO for iPod Back Front respectively but on iPhone 6S it returns the same YES, NO although it has Retina Flash.

Boris Yurkevich09-Jun-2016 01:55 PM

Sorry, I made a mistake. The code below actually returns YES. The real problem is when I run it on iPod Touch it returns NO for both Read and Front altho my 4th gen iPod has Flash on the back.

By Boris.Yurkevich at June 9, 2016, 1:17 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!