An object that represents a conversation in the Messages app.


class MSConversation : NSObject


The MSConversation class represents a conversation in the Messages app. Use conversation objects to access information about the currently selected message or the conversation participants, or to send text, stickers, attachments, or message objects.


Accessing the Selected Message

var selectedMessage: MSMessage?

The message that the user selected in the conversation transcript.

Accessing Participants

var localParticipantIdentifier: UUID

A UUID that identifies the user on this device.

var remoteParticipantIdentifiers: [UUID]

An array of UUIDs representing the remote participants in this conversation.

Inserting Content into the Input Field

func insert(MSMessage, completionHandler: ((Error?) -> Void)?)

Inserts a message object into the Messages app’s input field.

func insert(MSSticker, completionHandler: ((Error?) -> Void)?)

Inserts a sticker into the current context.

func insertText(String, completionHandler: ((Error?) -> Void)?)

Inserts text into the Messages app’s input field.


Inherits From

Conforms To

See Also

Message Content

class MSSticker

A sticker that can be sent as a new message or attached to an existing balloon in the Messages app’s transcript.