---
title: "subscript(rawAttachment:)"
framework: coremedia
role: symbol
role_heading: Instance Subscript
path: "coremedia/cmsamplebuffer/sampleattachments-swift.struct/subscript(rawattachment:)"
---

# subscript(rawAttachment:)

Get or set a custom attachment value. The value must be a plist type.

## Declaration

```swift
subscript(rawAttachment key: String) -> (any Sendable)? { get set }
```
