<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureSession/addInput(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureSession(im)addInput:"
  },
  "title" : "addInput(_:)"
}
-->

# addInput(_:)

Adds a capture input to the session.

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

## Parameters

`input`

An input to add to the session.

## Discussion

It’s only valid to call this method if [`canAddInput(_:)`](/documentation/AVFoundation/AVCaptureSession/canAddInput(_:)) returns <doc://com.apple.documentation/documentation/Swift/true>.

You can invoke this method while the session is running.

---

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)