---
title: "canSetSessionPreset(_:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcapturesession/cansetsessionpreset(_:)"
---

# canSetSessionPreset(_:)

Determines whether you can configure a capture session with the specified preset.

## Declaration

```swift
func canSetSessionPreset(_ preset: AVCaptureSession.Preset) -> Bool
```

## Parameters

- `preset`: A preset value to test.

## Return Value

Return Value true if the capture session supports the preset; otherwise, false.

## Discussion

Discussion Use this method to determine whether the capture session, in its current I/O configuration, supports a particular preset. You can only set a preset that returns true as the capture session’s sessionPreset property value.

## See Also

### Setting a session preset

- [AVCaptureSession.Preset](avfoundation/avcapturesession/preset.md)
- [sessionPreset](avfoundation/avcapturesession/sessionpreset.md)
