resolveOutgoingMessageType(for:with:)
Determines what type of message to send.
Declaration
optional func resolveOutgoingMessageType(for intent: INSendMessageIntent, with completion: @escaping @Sendable (INOutgoingMessageTypeResolutionResult) -> Void)optional func resolveOutgoingMessageType(for intent: INSendMessageIntent) async -> INOutgoingMessageTypeResolutionResultParameters
- intent:
The intent object that contains details about the user’s request. Use this object to get the initial information, if any, provided by the user.
- completion:
The block to execute with the resolution. You must execute this block while implementing this method. This block has no return value and takes the following parameter:
- resolutionResult
The object that contains the details of your proposed resolution. For a successful resolution, create a resolution object with the Inoutgoingmessagetype for the message.
Discussion
If you can’t handle messages of the type specified in the intent’s outgoingMessageType, create a result with unsupported() and provide that when you call the completion handler.