Introduction
A property list is how macOS, iOS and their
apps store settings and small amounts of structured data. App preferences, the
Info.plist that describes every app bundle, and many system settings are
property lists. The format came to Apple from NeXT.
A property list holds a tree of simple values: dictionaries, arrays, strings, numbers, booleans, dates and raw data. The same tree can be saved as readable XML or as a compact binary file, and Apple’s tools convert freely between the two.
Structure
An XML property list has a <plist version="1.0"> root holding one
value. Dictionaries are <dict> elements with alternating
<key> and value elements, and the values are
<string>, <integer>, <real>,
<true/>, <false/>, <date>,
<data> in base64, <array> and nested
<dict>.
A binary property list starts with bplist00. The objects follow, each
starting with a marker byte whose high four bits give its type and whose low four bits
give its size. Arrays and dictionaries refer to their members by number. An offset table
gives the position of every object, and a 32-byte trailer at the very end gives the sizes
used, the number of objects, the top object and where the offset table starts.
0Headerbplist008 bytes8Objects each a marker byte then its value or referencesvaries…Offset table the position of every objectvariesendTrailer sizes, object count, top object, table offset32 bytes
Links
Software
- Xcode – Apple’s developer tools, with a property list editor (macOS)
- plutil – command-line tool built into macOS that checks and converts property lists (macOS)
- PlistEdit Pro – property list editor for XML and binary plists (macOS)
- ProperTree – free property list editor (Windows, macOS, Linux)
Developers
- plistlib – standard library module that reads and writes XML and binary property lists (Python)
- PropertyListSerialization – Apple’s Foundation class for reading and writing property lists (Swift, Objective-C)