Property List Structure and Contents

Property lists are constructed from the basic Core Foundation types CFString, CFNumber, CFBoolean, CFDate, and CFData. To build a complex data structure out of these basic types, you put them inside a CFDictionary or CFArray. To simplify programming with property lists, any of the property list types can also be referred to using a reference of type CFPropertyListRef .

In a CFDictionary, data is structured as key-value pairs, where each key is a string and the key's value can be a CFString, a CFNumber, a CFBoolean, a CFDate, a CFData, a CFArray, or another CFDictionary. When using CFDictionary as a property list, all keys must be strings.

In a CFArray, data is structured as an ordered collection of objects that can be accessed by index. In a property list, a CFArray can contain any of the basic property list types, as well as CFDictionaries and other CFArrays.

Note that although CFDictionaries and CFArrays can contain data types other than the property list types, if they do, they're not property lists and you can't use the Core Foundation property list programming interface to work with them. Core Foundation Property List Services Tasks contains examples of creating and manipulating property lists.


© 1999 Apple Computer, Inc. (Last Updated 02 November 99)