---
title: "init(session:)"
framework: messages
role: symbol
role_heading: Initializer
path: "messages/msmessage/init(session:)"
---

# init(session:)

Initializes a new message that is part of the provided session.

## Declaration

```swift
init(session: MSSession)
```

## Parameters

- `session`: The session object tracking an updatable exchange of messages.

## Return Value

Return Value A newly initialized message.

## Discussion

Discussion Use this initializer to create an updatable message. Messages that are part of a session receive special treatment by the Messages app. When the app receives a message that is part of an existing session, the previous message is moved to the bottom of the transcript and updated with the new message’s content.

## See Also

### Creating Messages

- [init()](messages/msmessage/init().md)
