A setting for whether to fire the flash when capturing photos.
- iOS 10.0+
- Mac Catalyst 13.0+
The default value for this setting is
Assuming a static scene, using the
AVCapture setting is equivalent to testing the
is property (which indicates whether flash is recommended for the scene currently visible to the camera), and then setting the
flash property of your photo settings output accordingly before requesting a capture. However, the visible scene can change between when you request a capture and when the camera hardware captures an image—the automatic setting ensures that the flash is enabled or disabled appropriately at the moment of capture. When the capture occurs, your
AVCapture methods receive an
AVCapture object whose
is property indicates which flash mode was used for that capture.
When specifying a flash mode, the following requirements apply:
The specified mode must be present in the photo output’s
The capture output validates these requirements when you call the
capture method. If your settings do not meet these requirements, that method raises an exception.