Declaration

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 init(personHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isMe:) method, and set the isMe parameter to true when the person is the user of the device. For example, when the current device user sends an outgoing message, set isMe to true. Similarly, when creating the recipient array for an incoming message—which should include the current device user—set isMe to true for the person in the recipient list that is the device user, and set the parameter to false for the other recipients.