How to save (and retrieve) NSAttributedString in a NSDictionary
I am trying to save and retrieve XML data to a file. For this purpose I am using NSDictionary 's writeToFile: The question is, how to write and retrieve an attributed string to and from a file on disk using NSDictionary 's writeToFile: ? NSAttributedString is not a property list object , so writeToFile: won't work. It does, however, conform to NSCoding , so you can write it to an archive with your dictionary as the root object (assuming that all the other objects in the dictionary also conform). If you need something more portable than archived object consider using RTF representation of