It turns out that my code was working correctly. The bug was in
another part of the app.
The problem actually was in use of NSDirectoryEnumerator (via
enumeratorAtPath) which was traversing into packages. So the code
found the RTF file inside the package, which is read in and wrote out,
stripping
Hi,
I'm not sure what exactly you are trying to do but i believe you need
to create a NSTextAttachment from the file wrapper and then generate
an attributed string out of it.
NSFileWrapper* filewrapper = [[NSFileWrapper alloc] initWithPath:path];
NSTextAttachment *attachment = [[[NSTextAttac