Indicates whether the flash is currently available for use.
SDKs
- iOS 5.0+
- macOS 10.15+
- Mac Catalyst 13.0+
Framework
- AVFoundation
Declaration
var isFlashAvailable: Bool { get }
Discussion
The flash may become unavailable if, for example, the device overheats and needs to cool off.
You can observe changes to the value of this property using Key-value observing.