Your app’s response to a send message intent.


class INSendMessageIntentResponse : INIntentResponse


Use an INSendMessageIntentResponse object to specify the results of sending a message to another user. You create instances of this class when confirming or handling a send message intent. Use this object to communicate whether the message was successfully sent or whether an error occurred.

You create an INSendMessageIntentResponse object in the confirm(intent:completion:) and handle(intent:completion:) methods of your send message handler object. For more information about implementing your handler object, see INSendMessageIntentHandling.


Initializing the Response Object

init(code: INSendMessageIntentResponseCode, userActivity: NSUserActivity?)

Initializes the response object with the specified code and user activity object.

Getting the Response Code

var code: INSendMessageIntentResponseCode

The code indicating whether you successfully handled the intent.

enum INSendMessageIntentResponseCode

Constants that indicate the response state.

Providing the Message

var sentMessage: INMessage?

The message sent by the intent.


Inherits From

Conforms To

See Also

Send a Message

protocol INSendMessageIntentHandling

An interface to handle sending messages to one or more designated users.

class INSendMessageIntent

A request to send a message to the designated recipients.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software