Mac OS X Reference Library Apple Developer
Search

Introduction to Property Lists

Property lists organize data into named values and lists of values using several object types. These types give you the means to produce data that is meaningfully structured, transportable, storable, and accessible, but still as efficient as possible. Property lists are frequently used by applications running on both Mac OS X and iOS. The property-list programming interfaces for Cocoa and Core Foundation allow you to convert hierarchically structured combinations of these basic types of objects to and from standard XML. You can save the XML data to disk and later use it to reconstruct the original objects.

This document describes property lists and their various representations, and how to work with them using both certain Foundation classes of Cocoa and Property List Services of Core Foundation.

Note: The user defaults system, which you programmatically access through the NSUserDefaults class, uses property lists to store objects representing user preferences. This limitation would seem to exclude many kinds of objects, such as NSColor and NSFont objects, from the user default system. But if objects conform to the NSCoding protocol they can be archived to NSData objects, which are property list‚Äìcompatible objects. For information on how to do this, see ‚ÄúStoring NSColor in User Defaults‚Äú; although this article focuses on NSColor objects, the procedure can be applied to any object that can be archived.

Organization of This Document

This document consists of the following chapters:




Last updated: 2010-03-24

Did this document help you? Yes It's good, but... Not helpful...