Contents

resolveLocationSearchType(for:with:)

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

Declaration

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

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 resolve the location used during a location-based search. Use this method to verify that you can perform a location-based search using the specified information. Consider the value of the locationSearchType property of the intent when determining your response. If the search type is unknown, return a value of not required to indicate that you do not intend to use the location information during the search. If the search type is a different value, return a successful resolution if the location 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