Xcode 12. Value of type 'AVCapturePhotoOutput' has no member 'supportedFlashModes'
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