Instance Method

resolveContent(for:with:)

Resolves the main content of the note.

Declaration

optional func resolveContent(for intent: INCreateNoteIntent, with completion: @escaping (INNoteContentResolutionResult) -> Void)

Parameters

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 use as the main content of the note.

Discussion

Implement this method to resolve the main contnet for a note. Use the intent object to obtain the content specified by the user. If the intent does not contain any content, you might want to prompt the user to specify a value. However, if there is a note title and it is sufficient for creating the note, you can also return a result indicating that a value for the content is not required.