Class

MSConversation

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.

Topics

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.

Sending Messages

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

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

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

Inserts a sticker into the Messages app’s input field.

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

Inserts text into the Messages app’s input field.

Relationships

Inherits From

Conforms To

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software