Property list
Encyclopedia
In the Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, iOS, NeXTSTEP
NEXTSTEP
NeXTSTEP was the object-oriented, multitasking operating system developed by NeXT Computer to run on its range of proprietary workstation computers, such as the NeXTcube...

, and GNUstep
GNUstep
GNUstep is a free software implementation of Cocoa Objective-C libraries , widget toolkit, and application development tools not only for Unix-like operating systems, but also for Microsoft Windows. It is part of the GNU Project.GNUstep features a cross-platform, object-oriented development...

 programming frameworks
Software framework
In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software...

, property list files are files that store serialized
Serialization
In computer science, in the context of data storage and transmission, serialization is the process of converting a data structure or object state into a format that can be stored and "resurrected" later in the same or another computer environment...

 object
Object (computer science)
In computer science, an object is any entity that can be manipulated by the commands of a programming language, such as a value, variable, function, or data structure...

s. Property list files use the filename extension
Filename extension
A filename extension is a suffix to the name of a computer file applied to indicate the encoding of its contents or usage....

 .plist, and thus are often referred to as p-list files.

Property list files are often used to store a user's settings. They are also used to store information about bundles and application
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...

s, a task served by the resource fork
Resource fork
The resource fork is a construct of the Mac OS operating system used to store structured data in a file, alongside unstructured data stored within the data fork. A resource fork stores information in a specific form, such as icons, the shapes of windows, definitions of menus and their contents, and...

 in the old Mac OS.

Representations

Since the data represented by property lists is somewhat abstract
Abstraction (computer science)
In computer science, abstraction is the process by which data and programs are defined with a representation similar to its pictorial meaning as rooted in the more complex realm of human life and language with their higher need of summarization and categorization , while hiding away the...

, the underlying file format
File format
A file format is a particular way that information is encoded for storage in a computer file.Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice-versa. There are different kinds of formats for...

 can be implemented many ways. Namely, NeXTSTEP
NEXTSTEP
NeXTSTEP was the object-oriented, multitasking operating system developed by NeXT Computer to run on its range of proprietary workstation computers, such as the NeXTcube...

 used one format to represent a property list, and the subsequent GNUstep
GNUstep
GNUstep is a free software implementation of Cocoa Objective-C libraries , widget toolkit, and application development tools not only for Unix-like operating systems, but also for Microsoft Windows. It is part of the GNU Project.GNUstep features a cross-platform, object-oriented development...

 and Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 frameworks introduced differing formats.

NeXTSTEP

Under NeXTSTEP
NEXTSTEP
NeXTSTEP was the object-oriented, multitasking operating system developed by NeXT Computer to run on its range of proprietary workstation computers, such as the NeXTcube...

, property lists were designed to be human-readable
Human-readable
A human-readable medium or human-readable format is a representation of data or information that can be naturally read by humans.In computing, human-readable data is often encoded as ASCII or Unicode text, rather than presented in a binary representation...

 and edited by hand, serialized to ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

 in a syntax somewhat like a programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

.

Strings were represented as:
"This is a plist string"
Binary data was represented as:
< [hexadecimal codes in ASCII] >
Arrays were represented as:
( "1", "2", "3" )
And dictionaries were represented as:
{
"key" = "value";
...
}

One limitation of the original NeXT property list format is that it could not represent an NSValue (number, boolean, etc) object.

GNUstep

GNUstep adopts the NeXTSTEP format, with a few additions. First, it now supports NSValue objects (which are represented as plain ASCII), and second, it supports NSDate objects (which are serialized as <*DYYYY-MM-DD HH:MM:SS timezone>)

GNUstep can also read and write property lists in the formats used by Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

.

Mac OS X

While Mac OS X can also read the NeXTSTEP format, Apple sets it aside in favor of two new formats of its own.

In Mac OS X 10.0
Mac OS X v10.0
Mac OS X version 10.0, code named "Cheetah", is the first major release of Mac OS X, Apple’s desktop and server operating system. Mac OS X v10.0 was released on March 24, 2001 for a price of US$129...

, the NeXTSTEP format was deprecated, and a new XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 format was introduced, with a public DTD
Document Type Declaration
A Document Type Declaration, or DOCTYPE, is an instruction that associates a particular SGML or XML document with a Document Type Definition...

 defined by Apple
Apple Computer
Apple Inc. is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh line of computers, the iPod, the iPhone and the iPad...

. The XML format supports non-ASCII characters and storing NSValue objects (which, unlike GNUstep's ASCII property list format, Apple's ASCII property list format does not support).

Since XML files, however, are not the most space-efficient means of storage, Mac OS X 10.2
Mac OS X v10.2
Mac OS X version 10.2 "Jaguar" is the third major release of Mac OS X, Apple's desktop and server operating system. It superseded Mac OS X v10.1 code name Puma and preceded Mac OS X Panther...

 introduced a new format where property list files are stored as binary files. Starting with Mac OS X 10.4
Mac OS X v10.4
Mac OS X v10.4 Tiger is the fifth major release of Mac OS X, Apple's desktop and server operating system for Macintosh computers. Tiger was released to the public on 29 April 2005 for US$129.95 as the successor to Mac OS X Panther , which had been released 18 months earlier...

, this is the default format for preference files.

The plutil utility (introduced in Mac OS X 10.2
Mac OS X v10.2
Mac OS X version 10.2 "Jaguar" is the third major release of Mac OS X, Apple's desktop and server operating system. It superseded Mac OS X v10.1 code name Puma and preceded Mac OS X Panther...

) can be used to check the syntax of property lists, or convert a property list file from one format to another. Also, the defaults
Defaults (software)
defaults is a command line utility that manipulates plist files. defaults is present in the Mac OS X and GNUstep operating systems, and it first appeared in the NeXTStep operating system upon which both of the aforementioned systems are based...

 utility (introduced in NeXTSTEP) can be used to manipulate plist files used for storage of preferences (also known before OS X as defaults, hence the name) on the command line via their preferences domain, and this utility can be used to edit arbitrary plist files.

XML property lists are hand-editable in any text editor, but Apple provides a "Property List Editor" application as part of their Developer Tools installation that provides a hierarchical viewer/editor which can also handle binary formatted plists. As of Mac OS X 10.4
Mac OS X v10.4
Mac OS X v10.4 Tiger is the fifth major release of Mac OS X, Apple's desktop and server operating system for Macintosh computers. Tiger was released to the public on 29 April 2005 for US$129.95 as the successor to Mac OS X Panther , which had been released 18 months earlier...

, Apple provides an AppleScript interface for reading property list files through the System Events application. As of Mac OS X 10.5
Mac OS X v10.5
Mac OS X Leopard is the sixth major release of Mac OS X, Apple's desktop and server operating system for Macintosh computers. Leopard was released on 26 October 2007 as the successor of Tiger , and is available in two variants: a desktop version suitable for personal computers, and a...

, Apple now provides an AppleScript interface for editing, creating and writing property list files as well.

For the XML format, the tags, related Foundation classes and CoreFoundation types, and data storage formats are as follows:
Foundation class CoreFoundation type XML Tag Storage format
NSString CFString <string> UTF-8 encoded string
NSNumber CFNumber <real>, <integer> Decimal string
NSNumber CFBoolean <true />, or <false /> No data (tag only)
NSDate CFDate <date> ISO 8601
ISO 8601
ISO 8601 Data elements and interchange formats – Information interchange – Representation of dates and times is an international standard covering the exchange of date and time-related data. It was issued by the International Organization for Standardization and was first published in 1988...

 formatted string
NSData CFData <data> Base64
Base64
Base64 is a group of similar encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation...

 encoded data
NSArray CFArray <array> Can contain any number of child elements
NSDictionary CFDictionary <dict> Alternating <key> tags and plist element tags

External links


Third party editing tools

  • PlistEdit, a general property list editor
  • PlistEdit Pro, a general property list editor
  • PrefEdit, specializing in editing preference plists
  • Property List Tools, an Applescript scripting addition for manipulating plists
  • Pledit, a general property list editor for Microsoft Windows
    Microsoft Windows
    Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

  • plist Editor for Windows, a freeware plist editor for Microsoft Windows
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK