Protocol

INSearchForMessagesIntentHandling

Handles the searching of the current user’s messages.

Overview

Use the methods of the INSearchForMessagesIntentHandling protocol to resolve, confirm, and handle requests to search the current user’s messages. Adopt this protocol in an object of your Intents extension that is capable of searching your app’s messages.

Siri delivers an INSearchForMessagesIntent object to your handler when the user asks to search their messages. The provided intent object contains the search parameters to use when matching messages. Use the methods of this protocol to resolve the search parameters, to perform the search, and to return the results.

Topics

Handling the Intent

func handle(intent: INSearchForMessagesIntent, completion: (INSearchForMessagesIntentResponse) -> Void)

Called when it is time for you to perform the search and return the results.

Required.

Confirming the Response

func confirm(intent: INSearchForMessagesIntent, completion: (INSearchForMessagesIntentResponse) -> Void)

Called when it is time for you to confirm whether you can perform the search.

Resolving Details of the Intent

func resolveRecipients(for: INSearchForMessagesIntent, with: ([INPersonResolutionResult]) -> Void)

Called when it is time for you to resolve the recipients search parameter.

func resolveSenders(for: INSearchForMessagesIntent, with: ([INPersonResolutionResult]) -> Void)

Called when it is time for you to resolve the sender search parameter.

func resolveAttributes(for: INSearchForMessagesIntent, with: (INMessageAttributeOptionsResolutionResult) -> Void)

Called when it is time to resolve any attributes associated with the messages.

func resolveDateTimeRange(for: INSearchForMessagesIntent, with: (INDateComponentsRangeResolutionResult) -> Void)

Called when it is time for you to resolve the dates at which the messages were sent.

func resolveSpeakableGroupNames(for: INSearchForMessagesIntent, with: ([INSpeakableStringResolutionResult]) -> Void)

Called when it is time for you to resolve the names of any groups that were recipients of the messages.

func resolveGroupNames(for: INSearchForMessagesIntent, with: ([INStringResolutionResult]) -> Void)

Called when it is time for you to resolve the names of any groups that were recipients of the messages.

Deprecated

Relationships

Inherits From

See Also

Search for Messages

class INSearchForMessagesIntent

Requests a list of messages matching the specified criteria.

class INSearchForMessagesIntentResponse

Contains your app’s response to a search for messages intent.