Contents

resolveTaskPriority(for:with:)

Resolves the priority to use during a priority-based search.

Declaration

optional func resolveTaskPriority(for intent: INSearchForNotebookItemsIntent, with completion: @escaping  @Sendable (INTaskPriorityResolutionResult) -> Void)
optional func resolveTaskPriority(for intent: INSearchForNotebookItemsIntent) async -> INTaskPriorityResolutionResult

Parameters

  • intent:

    The intent object containing details about the user’s request. Use this object to get the initial information, if any, provided by the user.

  • completion:

    The handler block to execute with the resolution. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:

    resolutionResult

    The object containing the details of your proposed resolution. For successful resolutions, create a resolution object with the location information that you intend to use during the search.

Discussion

Implement this method to verify that you can perform a location-based search using the specified information. Consider the value of the taskPriority property of the intent when determining your response. If the task type is unknown, return a value of not required to indicate that you do not intend to use the priority information during the search. If the search type is a different value, return a successful resolution if the taskPriority property of the intent contains enough information to perform the search. Return a different result if it does not.

See Also

Resolving the Intent Parameters