---
title: metadata
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hkattachment/metadata
---

# metadata

Additional data associated with the attachment in the HealthKit store.

## Declaration

```swift
var metadata: [String : Any]? { get }
```

## Discussion

Discussion The metadata dictionary contains extra information describing this object. The dictionary’s keys are all strings. The values can be strings, numbers, or dates. For a complete list of predefined metadata keys, see Metadata Keys. Using predefined keys helps facilitate sharing data between apps; however, you’re also encouraged to create your own, custom keys as needed to extend a HealthKit object’s capabilities.

## See Also

### Accessing attachment data

- [name](healthkit/hkattachment/name.md)
- [identifier](healthkit/hkattachment/identifier.md)
- [contentType](healthkit/hkattachment/contenttype.md)
- [size](healthkit/hkattachment/size.md)
- [creationDate](healthkit/hkattachment/creationdate.md)
- [HKAttachment.AsyncBytes](healthkit/hkattachment/asyncbytes.md)
