---
title: "setConfiguration(_:for:)"
framework: screencapturekit
role: symbol
role_heading: Instance Method
path: "screencapturekit/sccontentsharingpicker/setconfiguration(_:for:)"
---

# setConfiguration(_:for:)

Sets the configuration for the content capture picker for a capture stream, providing allowed selection modes and content excluded from selection.

## Declaration

```swift
func setConfiguration(_ configuration: SCContentSharingPickerConfiguration?, for stream: SCStream)
```

## Parameters

- `configuration`: The configuration to set for the given capture stream. When this value is nil, changes the stream configuration to use doc://com.apple.screencapturekit/documentation/ScreenCaptureKit/SCContentSharingPicker/defaultConfiguration-9v5sa.
- `stream`: The capture stream to set a configuration for. When this value is nil, applies to all currently active streams.

## See Also

### Stream configuration

- [configuration](screencapturekit/sccontentsharingpicker/configuration.md)
- [defaultConfiguration](screencapturekit/sccontentsharingpicker/defaultconfiguration-94q2b.md)
- [maximumStreamCount](screencapturekit/sccontentsharingpicker/maximumstreamcount-2kuaa.md)
