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

# canAddInput(_:)

Determines whether you can add an input to a session.

## Declaration

```swift
func canAddInput(_ input: AVCaptureInput) -> Bool
```

## Parameters

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

## Return Value

Return Value true if you can add the input to the session; otherwise, false.

## Discussion

Discussion This method returns false if you can’t add an input to a capture session. This occurs, for example, if you attempt to add the input to a session twice, or if the input already belongs to another capture session.

## See Also

### Configuring inputs

- [inputs](avfoundation/avcapturesession/inputs.md)
- [addInput(_:)](avfoundation/avcapturesession/addinput(_:).md)
- [removeInput(_:)](avfoundation/avcapturesession/removeinput(_:).md)
