Property List

Template: Infobox file format / Maintenance / Magic number is missing template: Infobox file format / Maintenance / default missing template: Infobox file format / Maintenance / missing site

Under Mac OS X, iOS, NeXTSTEP and GNUstep serve Property list files (German list of properties) of the serialization of associative data fields (English and dictionaries ). Since these files almost always have the plist extension., They are often also called p -list files.

The two currently valid plist formats are binary encoded on the one hand, based on XML, and others. They are equally supported by the system and are compatible with each other.

The files are commonly used to save the user's settings; continues to hold each bundle at least a file called Info.plist, are included in the general information about the bundle.

  • 4.1 editors
  • 4.2 libraries

History

In NeXTSTEP a file format for serialization associative arrays was introduced (nested basically name - value pairs or arrays of values). Developers were so simple example Save and read settings or information.

Since Mac OS X is the direct successor of NeXTStep, it also took the data format for plist files. Apple declared the previous format as invalid, and introduced a new one based on XML, which took over the functions of its predecessor while adding new data types.

GNUstep, a NeXTSTEP clone took over the old format for compatibility, and expanded it to two data types.

Representation

Since the data that can be stored in these files, are very abstract, they can be stored in a variety of ways. Over time, the format of the files has changed; so used NeXTStep another format as Mac OS X and GNUstep do this.

Next Step

The plist files under NeXTStep were designed to be changeable by human readable and hand; that's why they were serialized in ASCII.

The data types were represented as follows:

" An example string " binary data < [ Hex code to ASCII ]> arrays ("1", "2", "3" ) Dictionaries / associative arrays {      "key" = "value";      ... } A disadvantage of this format was that no NSValue (number, Boolean, etc. ) could not be saved.

GNUstep

GNUstep took over the plist format from Next Step, but made ​​some changes. Firstly NSValues ​​support were (represented as ASCII), on the other hand NSDate has been added (illustration: < * DYYYY -MM -DD HH: MM: SS timezone > ).

Furthermore GNUstep can read and write the plist format from Mac OS X.

Mac OS X

Although Mac OS X can read the old NeXTSTEP format, with Mac OS X 10.0 but it has been declared as obsolete and a new XML-based plist format was introduced. Apple has released for a DTD.

Because XML files are indeed human readable, but this is very memory inefficient, was introduced with Mac OS X 10.2, a new binary plist format. The two formats are compatible, and can be converted with plutil.

Although XML plist files can be edited by hand, but since the above a certain complexity is a laborious undertaking, Apple delivered with the Xcode package up to version 3.2 with the Property List Editor from. As of Xcode 4.0, the editor is integrated into the Xcode IDE.

AppleScript can by calling defaults, also read and write plist files.

Starting with Mac OS X 10.7 plutil offers also the possibility to convert plist files to JSON and vice versa.

The command line tool defaults was originally intended to change settings of programs from the shell; However, because these files usually are plist files, also can be changed any plist files with the tool.

Over time, developers have developed for a variety of programming languages ​​plist editors and libraries that serialize the plist files and can convert data types of the language.

In plist files in XML format are available for the following types of data (and the corresponding Cocoa and Core Foundation types) the following tags valid:

662419
de