---
title: "loadMetadata(of:)"
framework: groupactivities
role: symbol
role_heading: Instance Method
path: "groupactivities/groupsessionjournal/attachment/loadmetadata(of:)"
---

# loadMetadata(of:)

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

## Declaration

```swift
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

Return Value The custom metadata object for the attachment.

## Discussion

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.

## See Also

### Downloading the attachment data

- [load(_:)](groupactivities/groupsessionjournal/attachment/load(_:).md)
