<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/CVBufferCopyAttachments(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "c:@F@CVBufferCopyAttachments"
  },
  "title" : "CVBufferCopyAttachments(_:_:)"
}
-->

# CVBufferCopyAttachments(_:_:)

Returns a copy of all attachments from a Core Video buffer.

```
func CVBufferCopyAttachments(_ buffer: CVBuffer, _ attachmentMode: CVAttachmentMode) -> CFDictionary?
```

## Parameters

`buffer`

A buffer with attachments to copy.

`attachmentMode`

The mode of the attachments you want to copy. See [`CVAttachmentMode`](/documentation/CoreVideo/CVAttachmentMode) for possible values.

## Return Value

A dictionary of all attachments identified by their keys, or `nil` if no attachment is present or you specify an invalid attachment mode.

## Discussion

This function returns a retained dictionary, which you need to release when you’re done with it.

---

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)