In new Xcode 12, there is an error: Value of type 'AVCapturePhotoOutput' has no member 'supportedFlashModes'
when i try to reach https://developer.apple.com/documentation/avfoundation/avcapturephotooutput/1648766-supportedflashmodes
Any suggestions?
Seems to be a bug on Xcode 12, but you can workaround it using macro conditions:
#if !targetEnvironment(simulator)
guard stillImageOutput?.supportedFlashModes.contains(mode) == true else { return }
//rest of your code
#endif
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