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

# addInput(_:)

Adds a capture input to the session.

## Declaration

```swift
func addInput(_ input: AVCaptureInput)
```

## Parameters

- `input`: An input to add to the session.

## Discussion

Discussion It’s only valid to call this method if canAddInput(_:) returns true. You can invoke this method while the session is running.

## See Also

### Configuring inputs

- [inputs](avfoundation/avcapturesession/inputs.md)
- [canAddInput(_:)](avfoundation/avcapturesession/canaddinput(_:).md)
- [removeInput(_:)](avfoundation/avcapturesession/removeinput(_:).md)
