<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GroupActivities",
  "identifier" : "/documentation/GroupActivities/GroupSessionJournal/Attachment/loadMetadata(of:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Group Activities"
    ],
    "preciseIdentifier" : "s:15GroupActivities0A14SessionJournalC10AttachmentV12loadMetadata2ofxxm_tYaKSeRzSERzlF"
  },
  "title" : "loadMetadata(of:)"
}
-->

# loadMetadata(of:)

Downloads the metadata for the attachment asynchronously and delivers it
as the type you specify.

```
func loadMetadata<MetadataType>(of: MetadataType.Type) async throws -> MetadataType where MetadataType : Decodable, MetadataType : Encodable
```

## Parameters

`of`

The type for your attachment’s custom metadata. This type must
match the one added with the attachment.

## Return Value

The custom metadata object for the attachment.

## Discussion

Use this function to retrieve any metadata you included with the attachment.
You might use this metadata to retrieve app-specific details that aren’t
part of the item’s intrinsic data format.

---

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)