resolveContent(for:with:)
Resolves the string to use when searching the content of notes.
Declaration
optional func resolveContent(for intent: INSearchForNotebookItemsIntent, with completion: @escaping @Sendable (INStringResolutionResult) -> Void)optional func resolveContent(for intent: INSearchForNotebookItemsIntent) async -> INStringResolutionResultParameters
- 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 search the content of notes. 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 a string. If you change the search term for any reason, return a resolution asking for confirmation of the change.