Instance Method

initWithRecipients:content:groupName:serviceName:sender:

Initializes a send message intent object with the specified content and recipients.

Declaration

- (instancetype)initWithRecipients:(NSArray<INPerson *> *)recipients content:(NSString *)content groupName:(NSString *)groupName serviceName:(NSString *)serviceName sender:(INPerson *)sender;

Parameters

recipients

The intended recipients of the message.

content

The contents of the message.

groupName

The name of a group that should receive the message. Specify nil if you do not want to send the message to a group address.

serviceName

The specific service to use when sending the message. You may specify nil if your app has only one way of sending messages.

sender

The person that created the message.

Return Value

An initialized intent or nil if the object could not be created.

Discussion

Normally, you do not create instances of this class yourself. Instead, Siri creates instances when the user asks to send a message to another user. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.

See Also

Creating the Intent Object

- initWithRecipients:content:speakableGroupName:conversationIdentifier:serviceName:sender:

Initializes a send message intent object with the specified content and recipients.