Class

INMessage

Information about a message managed by your app.

Declaration

@interface INMessage : NSObject

Overview

An INMessage object conveys information about your app’s messages to Siri. You create message objects as part of your response to an INSearchForMessagesIntent object. Message objects contain the unique message identifier and additional information such as the message contents, sender, and recipients.

When creating the INPerson object for the sender or recipients, use the initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isMe: method, and set the isMe parameter to YES when the person is the user of the device. For example, if the current device user is sending an outgoing message, set isMe to YES. Similarly, when creating the recipient array for an incoming message—which should include the current device user—set isMe to YES for the person in the recipient list that is the device user, and set the parameter to NO for the other recipients.

Topics

Initializing a Message Object

- initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:messageType:

Initializes a message object with the specified unique identifier and content.

- initWithIdentifier:conversationIdentifier:content:dateSent:sender:recipients:groupName:messageType:

Initializes a message object with the specified unique identifier and content.

- initWithIdentifier:content:dateSent:sender:recipients:

Initializes a message object with the specified unique identifier and content.

Identifying the Message

identifier

The app-specific unique identifier for the message.

conversationIdentifier

The identifier associated with the conversation.

Getting the Message Attributes

messageType

The type of content contained in the message.

INMessageType

Constants indicating the type of content contained in a message.

sender

The user that sent the message.

recipients

The users that received the message.

groupName

The name of the group associated with the message.

content

The content of the message.

dateSent

The date the sender sent the message.

Instance Properties

Relationships

Inherits From

See Also

Data Objects

INMessageAttribute

Constants indicating an attribute of a message.

INMessageAttributeOptions

Constants indicating the status of a message.

INPerson

The information about a user involved in a SiriKit interaction.