hyperoslo / ImagePicker

:camera: Reinventing the way ImagePicker works.
Other
4.86k stars 676 forks source link

'flashMode' and 'isflashMode' was deprecated in iOS 10.0: Use AVCapturePhotoSettings.flashMode instead. #474

Open willby5890 opened 3 years ago

willby5890 commented 3 years ago

The flashMode was deprecated and a warning shows in CameraMan.swift. The new method is not easily applied.

func flash(_ mode: AVCaptureDevice.FlashMode) { guard let device = currentInput?.device, device.isFlashModeSupported(mode) else { return } // guard let device = getSettings(camera: camera, flashMode: flashMode) else {return}

queue.async { [self] in
  self.lock {
    device.flashMode = mode
//    let settings = getSettings(camera: camera!, flashMode: flashMode)

  }
}

}

3lvis commented 3 years ago

Any chance to get some help here? I don't have the bandwidth to fix issues but I can take some time to review them and merge them.