resolveLocation(for:with:)
Resolves how to use a location value during the search.
Declaration
optional func resolveLocation(for intent: INSearchForNotebookItemsIntent, with completion: @escaping @Sendable (INPlacemarkResolutionResult) -> Void)optional func resolveLocation(for intent: INSearchForNotebookItemsIntent) async -> INPlacemarkResolutionResultParameters
- 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 search type that you support.
Discussion
Implement this method to resolve how to use a location value during the search. Use this method to verify that you can perform a location-based search for the type specified by the locationSearchType property of the intent. If the type is INLocationSearchType.unknown or you do not consider locations when performing the search, you can return a resolution indicating that the location type is not required. Return a successful resolution if you support searching using the specified type or return a different result if you do not support the specific type requested by the user.