Contents

handle(intent:completion:)

Sends the message to the specified recipients.

Declaration

func handle(intent: INSendMessageIntent, completion: @escaping  @Sendable (INSendMessageIntentResponse) -> Void)
func handle(intent: INSendMessageIntent) async -> INSendMessageIntentResponse

Parameters

  • intent:

    The intent object that contains details about the user’s request. The information in this object has already been resolved and confirmed by the user.

  • completion:

    The handler block to execute with your response. You must execute this handler while implementing this method. This handler has no return value and takes the following parameter:

    response

    The Insendmessageintentresponse object containing the status of the request. This parameter must not be nil.

Discussion

Your implementation of this method must send the message to the designated recipients. The response object you provide should indicate the status of the message.