Format for com.apple.notes.richtext UTI (Apple Notes)

Hi,


Trying to extract the text/images from a Note copied to the pasteboard.


The UTI is com.apple.notes.richtext and the type is an NSData - beyond that I don't know how the info is encoded. Tried UIImage, NSDictionary, NSAttributedString etc.


Anyone know its format?


Thanks


Craig

Replies

The View Content Graph action in the Shortcuts app might help. Use the Find Notes action to grab a note and then View the graph. Click the Note node and INNote. You will see something like this:


<INNote: 0x2828c8640> {
    identifier = mobilenotes://showNote?identifier=AD4D9556-203B-4163-9572-B02ABABF4527;
    title = Test Note;
    groupName = Notes;
    contents = (
        <INTextNoteContent: 0x28338e430> {
            text = 
            
            This is a test note;
        },
    );
    createdDateComponents = <NSDateComponents: 0x28338fd20> {
        Calendar Year: 2019
        Month: 7
        Day: 29
        Hour: 10
        Minute: 23
        Second: 34;
    modifiedDateComponents = <NSDateComponents: 0x28338d170> {
        Calendar Year: 2019
        Month: 7
        Day: 29
        Hour: 10
        Minute: 23
        Second: 45;
}