resolveDateCreated(for:with:)
Resolves the range of dates for the search.
Declaration
optional func resolveDateCreated(for intent: INSearchCallHistoryIntent, with completion: @escaping @Sendable (INDateComponentsRangeResolutionResult) -> Void)optional func resolveDateCreated(for intent: INSearchCallHistoryIntent) 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 block to execute with the resolution. You must execute this block at some point during your implementation of this method. This block 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 with the date range that you’re able to search.
Discussion
When resolving the set of dates, always strive toward a successful resolution, but feel free to return a different result where appropriate. For example, if you don’t support searching for records that are more than one year old, you could return an unsupported resolution if the user specifies a date that’s more than one year in the past.