resolveTitle(for:with:)
Resolves the string to use when searching the title of notes, tasks, or reminders.
Declaration
optional func resolveTitle(for intent: INSearchForNotebookItemsIntent, with completion: @escaping @Sendable (INSpeakableStringResolutionResult) -> Void)optional func resolveTitle(for intent: INSearchForNotebookItemsIntent) async -> INSpeakableStringResolutionResultParameters
- 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 text you intend to use for your search.
Discussion
Implement this method to resolve the string used when searching the title of notes, tasks, or reminders. Use this method to verify any search terms before you perform the actual search. In most cases, you should return a successful resolution for the provided string. If there is no string and you do not require a string to perform the search, return a resolution indicating you don’t need the string. If you change the search term for any reason, return a resolution asking for confirmation of the change.