resolveDateTime(for:with:)
Resolves the date to use during a date-based search.
Declaration
optional func resolveDateTime(for intent: INSearchForNotebookItemsIntent, with completion: @escaping @Sendable (INDateComponentsRangeResolutionResult) -> Void)optional func resolveDateTime(for intent: INSearchForNotebookItemsIntent) async -> INDateComponentsRangeResolutionResultParameters
- 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 date information that you intend to use during the search.
Discussion
Implement this method to resolve the date used during a date-based search. Use this method to verify that you can perform a date-based search using the specified date information. Consider the value of the dateSearchType property of the intent when determining your response. If the search type is INDateSearchType.unknown, return a value of not required to indicate that you do not intend to use the date information during the search. If the search type is a different value, return a successful resolution if the dateTime property of the intent contains enough information to perform the search. Return a different result if it does not.