---
title: GroupSessionMessenger.Messages
framework: groupactivities
role: symbol
role_heading: Structure
path: groupactivities/groupsessionmessenger/messages
---

# GroupSessionMessenger.Messages

An asynchronous sequence of messages sent to the session.

## Declaration

```swift
struct Messages<Message> where Message : Decodable, Message : Encodable
```

## Overview

Overview When you use a GroupSessionMessenger to communicate across devices, the Messages structure provides the sequence of messages the other devices send. Iterate over the contents of this structure asynchronously to retrieve each message and update your app. Don’t create this structure directly. Instead, use the messages(of:) or messages(of:) method to retrieve the messages for a given session.

## Topics

### Creating an iterator

- [GroupSessionMessenger.Messages.Iterator](groupactivities/groupsessionmessenger/messages/iterator.md)

## Relationships

### Conforms To

- [AsyncSequence](swift/asyncsequence.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Receiving data from other participants

- [messages(of:)](groupactivities/groupsessionmessenger/messages(of:)-626qo.md)
- [messages(of:)](groupactivities/groupsessionmessenger/messages(of:)-jvoz.md)
- [GroupSessionMessenger.MessageContext](groupactivities/groupsessionmessenger/messagecontext.md)
