<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMAttachmentBearerAttachments/subscript(_:)-74jgw",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "Core Media",
      "CoreMedia"
    ],
    "preciseIdentifier" : "s:9CoreMedia29CMAttachmentBearerAttachmentsVyAC5ValueOSgSo17CMSampleBufferRefaAAE13AttachmentKeyVcip"
  },
  "title" : "subscript(_:)"
}
-->

# subscript(_:)

Gets the value associated with the specified attachment key.

```
subscript(key: CMSampleBuffer.AttachmentKey) -> CMAttachmentBearerAttachments.Value? { get set }
```

---

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)