<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMSampleBuffer/SamplePropertiesCollection/attachments",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "s:So17CMSampleBufferRefa9CoreMediaE26SamplePropertiesCollectionV11attachmentsSayAbCE0F11AttachmentsVGSgvp"
  },
  "title" : "attachments"
}
-->

# attachments

Access sample attachments.

```
var attachments: [CMSampleBuffer.SampleAttachments]? { get set }
```

## Discussion

When setting attachments array, the number of entries must match [`count`](/documentation/CoreMedia/CMSampleBuffer/SamplePropertiesCollection/count).

---

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)