Protocol

INSendMessageIntentHandling

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

Overview

Use the methods of the INSendMessageIntentHandling protocol to resolve, confirm, and handle requests to send messages to the designated users. Adopt this protocol in an object of your Intents extension that is capable of sending the messages.

Siri delivers an INSendMessageIntent object to your handler when the user asks to send a message using your app. The provided intent object contains the recipients and content of the message. Use the methods of this protocol to resolve the parameters and to validate that sending the message is possible.

Topics

Handling the Intent

func handle(intent: INSendMessageIntent, completion: (INSendMessageIntentResponse) -> Void)

Called when it is time for you to send the message.

Required.

Confirming the Response

func confirm(intent: INSendMessageIntent, completion: (INSendMessageIntentResponse) -> Void)

Called when it is time for you to confirm that you can send the message.

Resolving the Intent Parameters

func resolveRecipients(for: INSendMessageIntent, with: ([INPersonResolutionResult]) -> Void)

Called when you need to resolve the recipients of the message.

func resolveContent(for: INSendMessageIntent, with: (INStringResolutionResult) -> Void)

Called when you need to resolve the contents of the message.

func resolveSpeakableGroupName(for: INSendMessageIntent, with: (INSpeakableStringResolutionResult) -> Void)

Called when you need to resolve the name of the group receiving the message.

func resolveGroupName(for: INSendMessageIntent, with: (INStringResolutionResult) -> Void)

Called when you need to resolve the name of the group receiving the message.

Deprecated

Relationships

Inherits From

See Also

Send a Message

class INSendMessageIntent

A request to send a message to the designated recipients.

class INSendMessageIntentResponse

Your app’s response to a send message intent.