Class

INSendMessageIntent

Requests the sending of a message to the designated recipients.

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 should confirm the request and create an INSendMessageIntentResponse object with the results.

For a list of other intents in the messages domain, see INMessagesDomainHandling.

Additional Intent Attributes

Table 1 lists additional attributes of this intent object.

Table 1

Send message intent attributes

Attribute

Description

Supported by

Siri

Always requires unlocked device

No

Apps can optionally ask the user to unlock the device before handling this intent. To require unlocking of the device, include the name of this class in the IntentsRestrictedWhileLocked key of your Intents extension’s Info.plist file.

Example Phrases

There are many ways in which users can ask Siri to send a message. Table 2 provides a few sample phrases in different languages. You can use these phrases during testing to trigger your intents. This list is not exhaustive and Siri may recognize many other phrases.

Table 2

Siri phrases that trigger the sending of a message

Locale

Example 1

Example 2

en

Send a message to Corey on <appName>

Using <appName> send a message to Jenny saying I'm almost there

zh_CN

<appName>发信息给芳芳

用微信发信息给芳芳

zh_HK

喺微信發訊息俾小明 → 買個蛋糕

<appName>發短訊俾陳家傑

zh_TW

<appName>訊息給John

<appName>傳簡訊給John說哈囉

yue_CN

喺微信发讯息俾小明 → 买个蛋糕

喺发短讯俾陈家杰

ar

أرسل رسالة <appName> إلى رامي

أرسل رسالة إلى رامي باستخدام <appName>

da

send en besked til john på <appName>

send en besked med <appName> til Peter

de

Schreib eine <appName> Nachricht an Tanja

Sende eine Nachricht mit <appName> an Thomas

es

Envía un mensaje de <appName> a Raúl

Mandar mensaje a Julián Serrano por <appName>

fi

Pistä <appName> viesti Jaakolle

Kirjoita viesti <appName>ssa Julialle

fr

Envoie un message à John via <appName>

Envoie un message <appName> à John

he

שלח הודעת <appName> ל-bluesky

באמצעות <appName> תשלח הודעה ליוני

it

Invia un messaggio a Giovanni su <appName>

Invia un messaggio usando <appName> a Nadia che dice sto arrivando

ja

<appName>で一郎にメッセージを送信

一郎に<appName>のメッセージを送って

ko

충헌한테 <appName> 메세지 보내

<appName>에서 충헌이한테 문자 보내

ms

Gunakan <appName> untuk hantar mesej kepada John

Hantar mesej <appName> kepada John

nb

Send en melding til Bjørn med <appName>

Send en <appName> melding til Jon og si jeg er nesten fremme

nl

Stuur een bericht naar Jan met <appName>

Kun je met <appName> een bericht sturen naar Sara waarin staat ik ben er bijna

pt

Envia uma mensagem no <appName> pro João

Usando <appName> mande uma mensagem para Maria dizendo estou quase chegando

ru

Создашь <appName> сообщение Анне

Написать сообщение Ивану с помощью <appName>

sv

Skicka ett meddelande på <appName> till Johanna

Skicka ett meddelande till Anders med <appName>

th

ส่งข้อความให้สมชายโดย <appName>

ส่งข้อความด้วย <appName> ให้สมหญิง

tr

Elif'e <appName> mesajı at

Elif'e <appName> mesajı gönder

In the preceding examples, <appName> represents the name of the app whose Intents extension sends the message. If your app uses custom names for contacts, you can tell Siri about those names using the INVocabulary class.

Topics

Creating the Intent Object

Specifying Details About a Message

var recipients: [INPerson]?

The array of users to receive the message.

var conversationIdentifier: String?

The identifier associated with the conversation.

var speakableGroupName: INSpeakableString?

The name of the group to receive the message.

var groupName: String?

The name of the group to receive the message.

Deprecated
var content: String?

The content of the message.

var serviceName: String?

The service to use when sending the message.

var sender: INPerson?

The person or account that is sending the message.

Relationships

Inherits From

Conforms To

See Also

Send a Message

protocol INSendMessageIntentHandling

Handles the sending of messages to one or more designated users.

class INSendMessageIntentResponse

Contains your app’s response to a send message intent.