iOS 10 beta 2: UIImagePickerController flash issue

UIImagePickerController cameraFlashMode always shows UIImagePickerControllerCameraFlashModeOff regardless of what it is set to. Does anyone have the same issue or know what happen?

I have the same problem on iOS10 release version.

Same problem here, also on iOS10 release version.


I've tried working around this using the AVCaptureSession, but then it is much more difficult to take a photo when one of the volume-buttons is clicked (which is possible in the UIImagePickerController).


My app needs both camera flash and using the volume buttons, which seems to be very difficult at the moment on iOS.

same bug

i am also facing the same problem in IOS 10.0.1 😟

This is a valid issue and did not happen in iOS 9 or earlier. I will file a bugreport for it, but those issues really cannot go into such a massive update-version.

Did any one file a bugreport on this Flash issue on UIImagepickercontroller?

Any immediate fix for Flash LED issue in UIIMagepicker controller? Whether we need to use APCaptureSession instead until Apple fixes this?

Note that setting 'cameraFlashMode' *does* work if 'showsCameraControls' is turned on.

But if 'showsCameraControls' is off, 'cameraFlashMode' does not work in iOS 10.0.2

I have filed a bug report with Apple

@riconroy This is exactly what I am observing as well.


EDIT: I've created a bug report with this id: 28891587

This helped me to fix with an ugly hack:


imagePicker.showsCameraControls = true

imagePicker.cameraFlashMode = .on

imagePicker.showsCameraControls = false


It goes fast enough not to appear.

Here is my workaround: force flash "on" after imagePicker has initialized...


You first need:

import AVFoundation


in my viewDidLoad:

NotificationCenter.default.addObserver(
self,
selector: #selector(handleimagePickerNotification),
name: NSNotification.Name.AVCaptureSessionDidStartRunning,
object: nil
) // image picker started running


and then:

func handleimagePickerNotification(message: NSNotification) {
if message.name == NSNotification.Name.AVCaptureSessionDidStartRunning { imagePickerController?.cameraFlashMode = .on }
} // handleimagePickerNotification


Note: handleimagePickerNotification receives other notifications in my case

Issue seems to be solved on iOS 10.2 . Now manual camera flash mode handling works fine again, without need of enabling and disabling showsCameraControls.

iOS 10 beta 2: UIImagePickerController flash issue
 
 
Q