Class

MSConversation

An object that represents a conversation in the Messages app.

Declaration

@interface MSConversation : NSObject

Overview

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

selectedMessage

The message that the user selected in the conversation transcript.

Accessing Participants

localParticipantIdentifier

A UUID that identifies the user on this device.

remoteParticipantIdentifiers

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

Inserting Content into the Input Field

- insertAttachment:withAlternateFilename:completionHandler:

Inserts an attachment into the current context.

- insertMessage:completionHandler:

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

- insertSticker:completionHandler:

Inserts a sticker into the current context.

- insertText:completionHandler:

Inserts text into the Messages app’s input field.

Directly Sending a Message

- sendAttachment:withAlternateFilename:completionHandler:

Sends the media file specified by the given URL.

- sendMessage:completionHandler:

Sends a message object.

- sendText:completionHandler:

Sends a text message.

Relationships

Inherits From

See Also

Message Content

MSSticker

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