Can't use AVCaptureDevice with a flash
问题 I am having difficult times, for something which I think ought to be simple. I just want to light the flash when taking a picture in my iOS app. And all I tried failed or works only 20 percent. Here is the code fired to light the flash up: // Here we have: captureDevice.hasFlash && captureDevice.isFlashModeSupported(.On) do {try captureDevice.lockForConfiguration() captureDevice.flashMode = .On captureDevice.unlockForConfiguration() } catch let error as NSError { print("captureDevice