---
title: hasTorch
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcapturedevice/hastorch
---

# hasTorch

A Boolean value that specifies whether the capture device has a torch.

## Declaration

```swift
var hasTorch: Bool { get }
```

## Discussion

Discussion A torch is a light source, such as an LED flash, that’s available on the device and used for illuminating captured content or providing general illumination. This property reflects whether the current device has such illumination hardware built-in. Even if the device has a torch, that torch might not be available for use, so check the value of the isTorchAvailable property before using it. This property is key-value observable.

## See Also

### Configuring torch settings

- [isTorchAvailable](avfoundation/avcapturedevice/istorchavailable.md)
- [isTorchActive](avfoundation/avcapturedevice/istorchactive.md)
- [torchLevel](avfoundation/avcapturedevice/torchlevel.md)
- [torchMode](avfoundation/avcapturedevice/torchmode-swift.property.md)
- [AVCaptureDevice.TorchMode](avfoundation/avcapturedevice/torchmode-swift.enum.md)
- [isTorchModeSupported(_:)](avfoundation/avcapturedevice/istorchmodesupported(_:).md)
- [setTorchModeOn(level:)](avfoundation/avcapturedevice/settorchmodeon(level:).md)
- [maxAvailableTorchLevel](avfoundation/avcapturedevice/maxavailabletorchlevel.md)
