INSendMessageIntent

INSendMessageIntent

INSendMessageIntent Class of Intents A request to send a message to the designated recipients.

class INSendMessageIntent

Overview

Siri creates an INSendMessageIntent object when the user asks to send a message to one or more users. This intent object contains the message to send and the recipients of the message, which can include groups of users. Use the information in this object to construct and send the message.

To handle this intent, the handler object in your Intents extension must adopt the INSendMessageIntentHandling protocol. Your handler confirms the request and creates an INSendMessageIntentResponse object with the results.

Note: To allow a user wearing AirPods to automatically hear messages, you must implement both `doc://com.apple.sirikit/documentation/Intents/INSearchForMessagesIntent and doc://com.apple.sirikit/documentation/Intents/INSendMessageIntent. Add //com.apple.documentation/documentation/UserNotifications/UNAuthorizationOptions/announcement to the options when calling //com.apple.documentation/documentation/UserNotifications/UNUserNotificationCenter/requestAuthorization(options:completionHandler:)). Finally, add //com.apple.documentation/documentation/UserNotifications/UNNotificationCategoryOptions/allowAnnouncement to the category option and doc://com.apple.sirikit/documentation/Intents/INSearchForMessagesIntent` to the category intent identifier.