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

# MSMessage

A custom message object.

```
class MSMessage
```

## Overview

Use the [`MSMessage`](/documentation/Messages/MSMessage) class to create custom message objects. To create interactive messages that can be updated by the conversation’s participants, instantiate a message with a session using the [`init(session:)`](/documentation/Messages/MSMessage/init(session:)) method. Otherwise, instantiate the message using the [`init()`](/documentation/Messages/MSMessage/init()) method.

## Topics

### Creating Messages

[`-  init`](/documentation/Messages/MSMessage/init())

Initializes a new message that is not part of a session.

[`-  initWithSession:`](/documentation/Messages/MSMessage/init(session:))

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

### Message Properties

[`accessibilityLabel`](/documentation/Messages/MSMessage/accessibilityLabel)

A localized string that describes the message.

[`error`](/documentation/Messages/MSMessage/error)

An error object describing why the system failed to send the message.

[`pending`](/documentation/Messages/MSMessage/isPending)

A Boolean value that indicates whether the message is pending or whether it has been sent or received.

[`layout`](/documentation/Messages/MSMessage/layout)

A layout object that defines the message’s appearance.

[`senderParticipantIdentifier`](/documentation/Messages/MSMessage/senderParticipantIdentifier)

A UUID identifying the participant that sent the message.

[`session`](/documentation/Messages/MSMessage/session)

The session that this message belongs to.

[`shouldExpire`](/documentation/Messages/MSMessage/shouldExpire)

A Boolean value that determines whether the message should expire after being read.

[`summaryText`](/documentation/Messages/MSMessage/summaryText)

A succinct description of the message.

[`URL`](/documentation/Messages/MSMessage/url)

A URL that encodes data to be transmitted with the message.

## Relationships

### Conforms To

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)