<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Messages",
  "identifier" : "/documentation/Messages/MSMessage/init(session:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Messages"
    ],
    "preciseIdentifier" : "c:objc(cs)MSMessage(im)initWithSession:"
  },
  "title" : "init(session:)"
}
-->

# init(session:)

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

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

## Parameters

`session`

The session object tracking an updatable exchange of messages.

## Return Value

A newly initialized message.

## 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.

---

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)