---
title: "add(_:)"
framework: groupactivities
role: symbol
role_heading: Instance Method
path: "groupactivities/groupsessionjournal/add(_:)"
---

# add(_:)

Adds the specified item to the journal and begins transferring the item’s data to the other participants’ devices so they can access it.

## Declaration

```swift
final func add<ItemType>(_ item: ItemType) async throws -> GroupSessionJournal.Attachment where ItemType : Transferable
```

## Parameters

- `item`: The item to send to other session participants. The type you specify must conform to the doc://com.apple.documentation/documentation/CoreTransferable/Transferable protocol. For more information about creating transferable types, see doc://com.apple.documentation/documentation/CoreTransferable.

## Return Value

Return Value An attachment object you can remove by passing it to the remove(attachment:) function.

## Discussion

Discussion Call this method when you want to send a file or codable data type to the other participants of an activity. The method runs asynchronously and can return before the upload operation finishes.

## See Also

### Uploading content to the session

- [add(_:metadata:)](groupactivities/groupsessionjournal/add(_:metadata:).md)
