NSTextAttachment missing NSFileWrapper

I have a file transfer app with a UITextView. In iOS 10 and 11, when you paste an image into the UITextView, for example from the camera roll, the NSTextAttachment has a fileWrapper. Using the NSFileWrapper, you can get the regularFileContents data. However, in the iOS 12 beta, the NSTextAttachment for the pasted image has no fileWrapper. This is obviously a problem for file transfer.


Is this a bug? Deliberate? Are there any release notes related to this? Any clarification would be appreciated. Thanks!

I can get the image data from NSTextAttachment -> NSImage -> CGImageRef -> CGDataProviderRef. However, I can't get the image file type. NSTextAttachment fileType is nil. CGImageSourceCreateWithDataProvider() -> CGImageSourceGetType() also return nil.

NSTextAttachment missing NSFileWrapper
 
 
Q