resolveContent(for:with:)
Resolves the content to append to the note.
Declaration
optional func resolveContent(for intent: INAppendToNoteIntent, with completion: @escaping @Sendable (INNoteContentResolutionResult) -> Void)optional func resolveContent(for intent: INAppendToNoteIntent) async -> INNoteContentResolutionResultParameters
- 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 or image that you intend to append to the main content of the note.
Discussion
Implement this method to resolve the content to append to a note. Use the intent object to obtain the content specified by the user. If the intent doesn’t contain any content, you might want to prompt the user to specify a value.