Messaging

Send messages and search the user's received messages.

Overview

With the messaging domain, users can ask Siri to compose new messages or search for existing messages. For new messages, your extension handles the composition and sending of the user’s message through your service. Similarly, your extension handles searches directly and returns any results to SiriKit. After a search, the user can ask Siri to read the returned messages and mark them as read, which may result in more calls to your intents extension to update the message attributes.

Figure 1

Sending a message using Siri

Sending a message using Siri

On iOS, you can use an Intents UI app extension to display a custom message composition interface.

Topics

First Steps

protocol INMessagesDomainHandling

An interface for adopting all of the protocols in the messages domain.

Search for Messages

protocol INSearchForMessagesIntentHandling

The handler interface for searching the current user’s messages.

class INSearchForMessagesIntent

A request to list the messages matching the specified criteria.

class INSearchForMessagesIntentResponse

Your app’s response to a search for messages intent.

Send a Message

protocol INSendMessageIntentHandling

The handler interface for sending messages to one or more designated users.

class INSendMessageIntent

A request to send a message to the designated recipients.

class INSendMessageIntentResponse

Your app’s response to a send message intent.

Set Message Attributes

protocol INSetMessageAttributeIntentHandling

The handler interface for modifying message attributes.

class INSetMessageAttributeIntent

A request to modify the attributes of a message.

class INSetMessageAttributeIntentResponse

Your app’s response to a set message attribute intent.

Data Objects

class INMessage

Information about a message managed by your app.

enum INMessageAttribute

Constants indicating an attribute of a message.

struct INMessageAttributeOptions

Constants indicating the status of a message.

class INPerson

The information about a user involved in a SiriKit interaction.

Resolution Results

class INMessageAttributeResolutionResult

A resolution result for assorted attributes of a message.

class INMessageAttributeOptionsResolutionResult

A resolution result for the options applied to a message.

class INDateComponentsRangeResolutionResult

A resolution result for the range of dates associated with an intent.

class INSendMessageRecipientResolutionResult

A resolution result for the recipient of a message.

class INPersonResolutionResult

A resolution result for a user associated with an intent.

See Also

Intent Domains

Lists and Notes

Create and manage notes and to-do list items.

Workouts

Start, end, and manage fitness routines.

Payments

Send payments between users or pay bills.

VoIP Calling

Initiate calls and search the user's call history.

Visual Codes

Convey contact and payment information using Quick Response (QR) codes.

Photos

Search for and display photos.

Ride Booking

Book rides and report their status.

Car Commands

Manage vehicle door locks and get the vehicle's status.

CarPlay

Interact with a vehicle's CarPlay system.

Restaurant Reservations

Create and manage restaurant reservations with help from the Maps app.