Archiving with XML Property Lists

Mac OS X applications use XML property lists (or plists) for storing things such as your default preferences, application settings, and configuration information, so it’s useful to know how to create them and read them back in. Their use for archiving purposes, however, is limited because when creating a property list for a data structure, specific object classes are not retained, multiple references to the same object are not stored, and the mutability of an object is not preserved.

Note

So-called “old-style” property lists store the data in a different format than XML property lists. Stick to using XML property lists in your program, if possible.

If your objects are of type NSString, NSDictionary, NSArray ...

Get Programming in Objective-C, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.