Contents

resolveItemType(for:with:)

Resolves the type of items to search.

Declaration

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

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 item type that you intend to include in your search results.

Discussion

Implement this method to resolve the type of items to search for. Use this method to verify that you can search for items of the specified type. If you support searching for the items, return a successful resolution with that item type. For types you do not support, you can return a successful resolution with a type that you do support. Alternatively, if you do not want to search an unsupported type, return a not required resolution from this method and use your confirmation method to indicate that a failure occurred.

See Also

Resolving the Intent Parameters