Post

Replies

Boosts

Views

Activity

Reply to Copy/Paste from Textview to Mail App Composer not working - MacCatalyst
Using this code to convert Attributed string into Data for making a pasteboard item. extension NSAttributedString {     var convertToData: Data? {         let options: [NSAttributedString.DocumentAttributeKey: Any] = [             .documentType: NSAttributedString.DocumentType.rtfd,             .characterEncoding: String.Encoding.utf8 ]         let range = NSRange(location: 0, length: length)         return try? data(from: range, documentAttributes: options)     }
Jun ’22