<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureDevice/torchMode-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureDevice(py)torchMode"
  },
  "title" : "torchMode"
}
-->

# torchMode

The current torch mode.

```
var torchMode: AVCaptureDevice.TorchMode { get set }
```

## Discussion

Setting the value of this property also sets the torch level to its maximum current value.

Before setting the value of this property, call the [`isTorchModeSupported(_:)`](/documentation/AVFoundation/AVCaptureDevice/isTorchModeSupported(_:)) method to make sure the device supports the desired mode. Setting the device to an unsupported torch mode results in the raising of an exception. For a list of possible values for this property, see [`AVCaptureDevice.TorchMode`](/documentation/AVFoundation/AVCaptureDevice/TorchMode-swift.enum).

Before changing the value of this property, you must call [`lockForConfiguration()`](/documentation/AVFoundation/AVCaptureDevice/lockForConfiguration()) to acquire exclusive access to the device’s configuration properties. Otherwise, setting the value of this property raises an exception. When you finish configuring the device, call [`unlockForConfiguration()`](/documentation/AVFoundation/AVCaptureDevice/unlockForConfiguration()) to release the lock and allow other devices to configure the settings.

This property is key-value observable.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)