Fact-checked by Grok 2 weeks ago

Property list

A property list, often abbreviated as plist, is a standardized originating from the operating system and widely used in Apple ecosystems such as macOS and for serializing structured data in a hierarchical manner. It supports basic data types including strings, numbers, booleans, dates, , arrays, and , with the root element typically being a dictionary. Property lists serve as a versatile serialization mechanism for configuration settings, application metadata, and preferences, enabling efficient storage and exchange of information between applications and the operating system. They can be represented in multiple formats: an XML-based textual form for human readability, a compact format for performance, or occasionally , with the .plist file extension. In Apple development, the most prominent example is the Info.plist file, which provides essential bundle information like version numbers, permissions, and supported orientations for apps, frameworks, and plug-ins. This format's design emphasizes simplicity and portability, allowing tools like to generate and edit them automatically while supporting localization and platform-specific customizations. Beyond Apple platforms, property lists have influenced similar structured data formats in other systems, underscoring their role in modern software configuration.

Overview

Definition and Purpose

A property list, often abbreviated as plist, is a standardized data serialization format in Apple's operating systems that represents a hierarchy of simple objects, enabling easy storage, transmission, and reconstruction of structured data. It serves as a lightweight mechanism for persisting small amounts of data—typically under a few hundred kilobytes—in a platform-independent manner, integrated natively with Core Foundation and frameworks. At its core, a property list comprises basic object types including strings (NSString/CFString), numbers (NSNumber/CFNumber, encompassing integers, floats, and booleans), dates (NSDate/CFDate), binary data blobs (NSData/CFData), (NSArray/CFArray of property list objects), and (NSDictionary/CFDictionary mapping keys to property list values). These elements can be nested arbitrarily to create complex structures, such as a dictionary containing an array of date-number pairs, ensuring the entire remains serializable without loss of type information. In the , property lists are predominantly used for application preferences, where user settings are saved in files like com.example.app.plist; bundle metadata in Info.plist files, which detail executable configurations such as version numbers and permissions; launch configurations for daemons and agents via .plist; and serializing transient objects for or caching. This format's simplicity and efficiency make it ideal for these roles, supporting quick reads and writes without requiring a full database. Compared to or , property lists provide enhanced through native support for dates and —avoiding the need to encode them as strings, which can lead to parsing ambiguities—while offering tighter integration with Apple's APIs via classes like NSPropertyListSerialization, unlike the more generic handling required for . Property lists can be serialized in human-readable XML or efficient formats. For illustration, a basic XML property list with a simple key-value pair appears as:
xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>UserName</key>
    <string>[Alice](/page/Alice)</string>
</dict>
</plist>
A nested structure, such as a dictionary containing an array of numbers, is:
xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Scores</key>
    <array>
        <real>95.5</real>
        <integer>88</integer>
    </array>
</dict>
</plist>
These examples use standard XML tags like <dict>, <key>, <string>, <array>, <real>, and <integer> to denote structure and types.

Historical Development

Property lists were first introduced as a foundational data structure in NeXTSTEP, the object-oriented operating system developed by NeXT and released in 1988, where they served as a mechanism for serializing and persisting hierarchical objects such as arrays and dictionaries. Designed initially for human-readable ASCII serialization, they enabled developers to store application settings and bundle information in a lightweight, portable format compatible with the system's Foundation framework. In 1994, property lists evolved through the specification, a collaborative standard between NeXT and that standardized the Application Kit and Foundation Kit APIs for cross-platform portability. This transition emphasized architecture-independent using classes like NSSerializer and NSDeserializer, restricting supported types to NSData, NSString, NSArray, and NSDictionary to ensure consistency in archiving and data transfer across environments. The format, an ASCII-based property list inherited by later systems, became a core element for user defaults management via NSUserDefaults and inter-application data exchange. Following Apple's acquisition of NeXT in 1997, property lists were integrated into Mac OS X (later renamed macOS) with its debut in 2001, building directly on the and heritage to form the basis of Cocoa's data persistence layer. A significant efficiency enhancement came in 2002 with Mac OS X 10.2 (), which introduced the binary property list format alongside the existing XML and ASCII options, allowing for more compact storage and faster read/write operations while maintaining lossless conversion between formats. Property lists expanded into mobile development with the launch of in 2007, where they became essential for app configuration through files like Info.plist, which describe bundle metadata, permissions, and supported features to the system. This adoption ensured consistency between macOS and iOS ecosystems, leveraging the same APIs for preferences and runtime data. Key milestones in the 2010s included the deprecation of the legacy ASCII OPENSTEP format for writing—retained only for reading older files—and deeper integration with Swift, introduced in 2014, via the PropertyListSerialization class in the Foundation framework. This allowed Swift developers to encode and decode property lists natively, supporting modern type-safe handling of arrays, dictionaries, and primitive values without relying on Objective-C bridges.

Data Formats

XML Representation

The XML representation of a property list is a human-readable, structured format based on the Extensible Markup Language (XML), designed for storing serialized collections of key-value pairs and arrays in Apple ecosystems. It adheres to a specific (DTD) that defines the allowable elements and their hierarchies, ensuring consistency and parseability. The root element is always <plist>, which encapsulates either a <dict> () or <array> as the top-level object, with all content encoded in for support. The DTD schema specifies the following core elements: <dict> for dictionaries, which contain zero or more pairs consisting of a <key> element (containing parsed character data for the key ) followed immediately by a value object; <array> for ordered lists, containing zero or more value objects; <string> for text (parsed character data); <integer> for signed base-10 integers (parsed character data); <real> for floating-point numbers (parsed character data); <date> for dates in format (YYYY-MM-DDTHH:MM:SSZ, parsed character data); <data> for binary encoded in (parsed character data); and <true/> or <false/> for values (empty elements). All tags are self-closing where empty and contain no attributes except the version attribute on <plist> (fixed to "1.0"). Dictionaries preserve the order of keys as they appear in the XML, facilitating . Property lists in XML format can be validated against Apple's official DTD using standard XML parsers or tools, with the DOCTYPE declaration <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> ensuring compliance. This validation checks for proper nesting, element sequencing (e.g., keys must precede values in dictionaries), and constraints, preventing malformed structures that could lead to parsing errors in applications. For instance, a nested representing application preferences might appear as follows:
xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>AppName</key>
    <string>MyApp</string>
    <key>Preferences</key>
    <dict>
        <key>Theme</key>
        <string>Dark</string>
        <key>Volume</key>
        <integer>80</integer>
        <key>NotificationsEnabled</key>
        <true/>
    </dict>
</dict>
</plist>
This example demonstrates a top-level with a key-value, a nested for preferences containing a , an , and a boolean. While the XML format's verbosity results in larger file sizes compared to the alternative, it excels in and editability, allowing direct modification in text editors without specialized tools.

Binary Representation

The property list (bplist) format is a compact method for structured data, optimized for machine processing in Apple's operating systems. It replaces the human-readable XML representation with a dense byte stream, enabling smaller file sizes and quicker load times, making it the preferred choice for production system files such as Info.plist in macOS and applications. This format adheres to version 1.0, as defined in Apple's Core Foundation implementation. The file structure begins with an 8-byte header: the magic bytes bplist (0x62706c697374) followed by the version 00 (indicating format version 1.0). This is succeeded by the serialized objects section, where data is stored contiguously. An offset table follows, consisting of variable-sized (typically 1-8 byte) entries pointing to the start of each object. The file concludes with a fixed 32-byte trailer containing metadata, including five unused bytes, a sort version (usually 0), offset integer size (e.g., 1 byte), object reference size (e.g., 1 byte), the total number of objects (as a 64-bit integer), the UID of the top-level object, and the offset to the table itself. These elements allow efficient random access to objects during parsing. Objects are referenced via unique identifiers (UIDs), which are indices into the offset table, promoting deduplication and for repeated values. Each object begins with a type specifier byte, where the high 4 bits denote the and the low 4 bits handle inline sizes for small s. Simple types include: 0x00 for ; 0x08 (false) and 0x09 (true) for booleans; 0x10 to 0x1F for (signed, big-endian, payload size 2^{low 4 bits} bytes if low 4 bits < 15, or length-prefixed if 0x1F); 0x80 to 0x8F for UIDs (size ( + 1) bytes). For larger or variable-sized data, the low 4 bits are set to 0xF, followed by a separate (1-8 bytes) preceding the payload. Strings use 0x50-0x5F for ASCII (0-15 bytes inline) or 0x60-0x6F for UTF-16; real numbers (doubles) are 0x20-0x23 (4- or 8-byte ); dates are 0x33 (8-byte double offset from 2001-01-01T00:00:00Z). Collections like arrays (0xA0-0xAF), sets (0xC0-0xCF), and dictionaries (0xD0-0xDF) specify count inline or via length integer, followed by reference UIDs to constituent objects (for arrays/sets) or key-value pairs (for dictionaries, with keys first). Data blobs (0x40-0x4F) follow similar length-prefixed patterns. This packing ensures small primitives are embedded directly, while larger or shared elements are referenced to minimize redundancy. The format's design yields significant efficiency gains: binary plists are much more compact than XML equivalents—often up to 50% smaller for complex structures—reducing storage needs and network transfer overhead, while parsing is faster due to the lack of text decoding and direct byte access. These benefits are evident in system usage, where binary plists power critical components like application bundles and preferences without the overhead of XML verbosity. Unlike XML plists, the binary variant avoids vulnerabilities inherent to XML processing, such as XML External Entity (XXE) attacks, through its rigid, non-parsable structure and strict byte-level validation. For illustration, consider a simple dictionary {"Disabled": true} from a launch daemon configuration (e.g., similar to telnet.plist). A valid binary structure (simplified; actual varies with padding and table entries) based on the format specification is as follows:
  • Header: 62 70 6c 69 73 74 00 00 (bplist00)
  • Objects section (offsets via table at end):
    • Dictionary object (UID 0, e.g., at offset 8): D1 01 09 (dict with 1 pair; key ref 0x01 to UID 1 string; value 0x09 true, assuming true as simple object UID 0 shared or adjusted)
    • String object (UID 1, e.g., at offset 11): 58 44 69 73 61 62 6c 65 64 (ASCII string, 8 chars: "Disabled")
  • Offset table (e.g., 1-byte offsets): 08 0B (offsets to dict at 8 and string at 11)
  • Trailer (32 bytes, simplified): 00 00 00 00 00 00 01 01 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 (metadata for 2 objects, top UID 0, table offset 19 decimal; exact bytes depend on positions)
This breakdown highlights how references (e.g., 0x01 for the key) and inline encoding keep the total size minimal compared to the XML equivalent (<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>Disabled</key><true/></dict></plist>).

System Integrations

NeXTSTEP Implementation

In , the operating system developed by from 1988 to 1997, property lists served as a core mechanism for archiving and persisting objects through the NSArchiver class, which serialized compatible objects into human-readable .plist files. This approach enabled developers to store structured data such as user preferences and application states in a lightweight, editable format, integral to the framework's object management. Property lists provided native support in for key development tools, forming the basis for archives that saved designs as .nib files—essentially archived collections of objects like windows, menus, and controls. They also handled application resources, allowing seamless integration of configuration data within bundles. Central to this were property list-compatible classes such as NSDictionary for key-value storage and NSArray for ordered collections, which supported direct via the writeToFile:atomically: method to output ASCII-formatted .plist files. A distinctive feature of property lists in early implementations was their use on the original black-and-white NeXT hardware, such as the (1988) and (1990), for system configuration files in a simple, text-based structure. NSArchiver facilitated this by encoding objects into portable archives, ensuring compatibility across the platform's object-oriented environment. The property list design laid the groundwork for the standard released in 1994, providing a standardized that influenced later evolutions in systems like macOS.

GNUstep Implementation

GNUstep, initiated in 1994 as an open-source implementation of the OpenStep specification, provides a faithful recreation of NeXTSTEP's APIs, including comprehensive support for property lists within its Foundation framework (also known as the Base library). This support enables developers to serialize and deserialize objects such as strings, numbers, dates, data, arrays, and dictionaries into human-readable formats (ASCII and XML), mirroring the original NeXTSTEP behavior while extending it for cross-platform use on Unix-like systems. The core functionality is handled by the class, which facilitates reading and writing property lists in multiple formats, including XML (conforming to Apple's plist DTD) and the legacy ASCII format for backward compatibility. ensures legal XML output by using standard XML escaping (e.g., entity references), prioritizing standards compliance over exact replication in edge cases. This class supports validation to confirm that conforms to property list before , preventing errors in application or data storage. Distinct from proprietary NeXT implementations, GNUstep leverages open-source tooling such as GNUstep-make, the project's build system, to automate the generation of property list files like Info-gnustep.plist for application bundles, which define such as names, resource paths, and document types. These tools integrate seamlessly with GNUstep applications deployed on platforms including and , allowing property lists to manage preferences, bundle information, and without platform-specific adjustments. Community-driven enhancements have expanded property list capabilities to include additional object types, such as NSURL for handling uniform resource identifiers as serializable strings or data. Furthermore, integration with tools like GORM (GNUstep Object Relationship Modeler) utilizes property lists to archive user interface designs and object relationships, enabling developers to map graphical elements to application logic stored in plist-based files.

macOS and iOS Implementation

In macOS and iOS, property lists serve as a core component of application bundles, with the Info.plist file being mandatory for all runnable code bundles to specify essential such as the bundle identifier, version number, supported orientations, and document types. This file is stored at the of iOS app bundles and within the Contents directory of macOS app bundles, enabling the operating system to interpret and launch applications correctly. Entitlements, implemented as separate property list files (typically named entitlements.plist), grant specific capabilities to apps, such as access to the camera, location services, or , and are embedded during the process to enforce runtime permissions. User defaults, managed through the NSUserDefaults class, store application preferences and settings in property list format, allowing persistent, key-value data storage within the app's sandboxed Library/Preferences directory on both platforms. On , property lists extend to sandboxed app environments, where entitlements property lists define the boundaries of access, network permissions, and to maintain app isolation. System-level configurations, including those for —the iOS home screen manager—rely on property lists to store user customizations like icon arrangements and wallpaper settings, typically in binary format for efficiency. Privacy manifests, introduced as property lists in , require developers to document data collection practices for apps and embedded third-party SDKs, including reasons for accessing sensitive APIs and whether data is used for tracking, enhancing transparency in the review process. Security features in macOS and integrate property lists with mechanisms, where provisioning profiles—a type of signed property list wrapped in ()—validate app authenticity and embedded entitlements during installation and launch. The hardened , enabled by default in signed apps since macOS 10.12 and , employs hashes to protect bundle resources and , including property lists, from unauthorized tampering by verifying integrity against modifications. These protections extend to dynamic library validation, ensuring that linked components adhere to the signed property list declarations. Evolving from their roots in , property lists in modern Apple operating systems continue to favor binary and XML formats via the PropertyListSerialization class for serialization and deserialization, though JSON alternatives exist through JSONSerialization for simpler data exchange; binary property lists remain preferred for their compactness and legacy compatibility in system and app configurations. Mac Catalyst, Apple's framework for porting apps to macOS, leverages unified property list structures to bridge the platforms, allowing shared Info.plist and entitlements files to handle cross-platform bundle identification and permissions seamlessly.

Tools and Manipulation

Command-Line Utilities

The primary command-line utility for managing property lists on macOS and is plutil, which supports operations such as syntax validation, format conversion between XML, binary, and , expansion of macros, and merging of multiple files. For instance, the -lint option checks a plist for validity and reports errors like "Unexpected character < at line 1" for malformed XML, while -convert xml1 or -convert binary1 transforms files between formats, preserving data integrity. Additional subcommands include -expand to resolve variable substitutions and -merge to combine plists, with detailed error reporting aiding debugging of structural issues such as invalid keys or type mismatches. Another essential tool is the defaults command, designed specifically for reading, writing, and deleting keys in user defaults databases, which are stored as property lists in ~/Library/Preferences. Common syntax includes defaults write com.example.app key value to set a value (e.g., defaults write com.apple.finder AppleShowAllFiles true to toggle hidden files) and defaults read domain to output the entire plist or defaults read domain key for a specific entry. This utility automatically handles serialization to binary format upon writing, making it suitable for configuring application preferences without direct file manipulation. PlistBuddy is an Apple-provided command-line tool for directly editing property list files, supporting operations like adding, setting, deleting, and querying keys and values using a simple syntax. For example, /usr/libexec/PlistBuddy -c "Add :key string value" file.plist adds a new string entry, while -c "Print :key" retrieves a value, making it useful for scripted modifications without full conversion. It operates on XML or binary plists and provides error messages for invalid paths or types. Open-source alternatives extend plist handling to non-Apple platforms. In GNUstep environments, a port of plutil provides similar functionality for editing, verifying, and converting property lists, integrated into the GNUstep Base library for cross-platform Objective-C development. Best practices for these utilities emphasize their use in shell scripts for automated batch processing, such as validating multiple app configuration plists before deployment: for file in *.plist; do plutil -lint "$file" || echo "Error in $file"; done. For defaults, scripts can standardize user settings across systems, like defaults write -g NSWindowShouldDragOnGesture -bool true piped into deployment tools, ensuring consistency without overwriting unrelated keys. Validation errors from plutil should be logged for auditing, as in plutil -lint config.plist > validation.log 2>&1, to catch issues like duplicate keys early in pipelines. As of macOS 12 Monterey (2021), plutil gained enhanced support, allowing direct conversion with -convert json and extraction of values via -p or -extract, which simplifies integration with modern web APIs and scripting languages. These command-line tools serve as lightweight alternatives to programming interfaces for shell-based automation.

Programming Interfaces

In and the frameworks, the NSPropertyListSerialization class in provides core methods for serializing and deserializing property lists. The +dataWithPropertyList:format:options:error: method converts a property list object—such as an NSArray, NSDictionary, NSString, NSNumber, NSData, or NSDate—into an NSData instance in either XML (NSPropertyListXMLFormat_v1_0) or binary (NSPropertyListBinaryFormat_v1_0) format, with options for controlling mutability (e.g., immutable or mutable containers) and an NSError pointer for detailed error reporting on invalid objects or format issues. Conversely, the +propertyListWithData:options:format:error: method parses NSData to reconstruct the original property list, validating the format and returning nil with an error if the data is malformed or contains unsupported types. In , Foundation introduces PropertyListEncoder and PropertyListDecoder classes starting from iOS 12.0, macOS 10.14, 12.0, and 5.0, enabling integration with the Codable protocol for encoding and decoding custom types as property lists. PropertyListEncoder serializes Encodable objects to in XML or binary formats via the .xml or .binary outputFormatting options, while PropertyListDecoder deserializes into Decodable types, throwing errors for type mismatches or invalid structures. This approach supports complex hierarchies by automatically handling conformance for standard types and allowing custom implementations for user-defined classes. GNUstep's NSPropertyListSerialization class offers equivalent functionality to its counterpart, supporting and deserialization in XML and formats through similar class methods. It extends compatibility by permitting non-standard types like NSValue and NSURL in property lists, which are converted to NSData or NSString representations during , enabling broader use in open-source environments. For C-based applications, Core Foundation exposes property list handling via functions like CFPropertyListCreateWithData, which constructs a CFPropertyListRef from CFData in specified formats (kCFPropertyListXMLFormat_v1_0 or kCFPropertyListBinaryFormat_v1_0), returning NULL and populating a CFError on parsing failures such as invalid or unknown object types. Companion functions like CFPropertyListCreateXMLData and CFPropertyListCreateData handle writing, with options for mutability to optimize memory usage in performance-critical scenarios. When processing large property lists, is crucial, as deserialization can create deep object graphs that consume substantial space; developers should use autorelease pools in or monitor allocations in to avoid excessive footprint. The serialization methods in NSPropertyListSerialization and Core Foundation are inherently thread-safe due to their stateless class-based design, but applications must synchronize access to shared mutable property list instances in multi-threaded contexts to prevent data races.

Advanced Features

Serialization Process

The serialization process for property lists involves converting an object composed of supported types into a serialized byte stream, typically in XML or format, while ensuring the graph adheres to strict validity rules. Before serialization, the input object must be validated to confirm it forms a valid property list : this includes verifying that the graph is acyclic (no circular references), contains only supported types such as NSString, NSNumber, NSData, NSDate, NSArray, and NSDictionary, and that all dictionary keys are strings. If validation fails, methods return nil and provide an error description, such as for unsupported custom objects, which cannot be directly serialized and instead require archiving via NSKeyedArchiver to preserve class identity and additional state. Once validated, the developer selects a format—XML for human-readable output or for compactness—and invokes the appropriate on NSPropertyListSerialization or its Core Foundation equivalent to write the data to a stream or file. The process recursively traverses the object graph, encoding each element according to the chosen format's structure; for instance, serialization uses a compact, length-prefixed representation to minimize size. To mitigate risks like stack overflows from deeply nested structures, implementations impose practical recursion depth limits, though no fixed universal limit is enforced—excessive depth may trigger runtime errors depending on the system's size. Deserialization reverses this by the byte stream back into native objects, with options for mutability (immutable for or mutable for editing). includes basic error recovery, such as halting on malformed and returning partial results if possible, but plists maintain strict typing without automatic between types like strings and numbers—mismatched types result in nil or exceptions. Developers must handle errors explicitly, checking return values and error pointers to ensure integrity. For optimization, binary format is recommended for large datasets due to its smaller footprint and faster read/write speeds compared to XML; additionally, large NSData blobs within plists can be compressed externally using methods like NSData compression before serialization. A typical workflow in Objective-C for serializing a dictionary might proceed as follows:
objective
NSDictionary *dict = @{@"key": @"value"};
NSError *error = nil;
NSData *serializedData = [NSPropertyListSerialization dataWithPropertyList:dict
                                                                  format:NSPropertyListBinaryFormat_v1_0
                                                                 options:0
                                                                   error:&error];
if (serializedData && !error) {
    // Write to file or stream
    [serializedData writeToFile:@"example.plist" atomically:YES];
} else {
    NSLog(@"Serialization failed: %@", error.localizedDescription);
}
Deserialization would then use propertyListWithData:options:format:error: to reconstruct the dictionary, specifying the expected format if known.

Path Expression Language

The path expression language for property lists leverages Key-Value Coding (KVC) key paths, enabling navigation through nested structures in dictionaries and arrays using string-based expressions. This syntax allows developers to access, query, and perform operations on property list data via APIs such as valueForKeyPath: on NSDictionary and NSArray objects, which are the foundational types for property lists in Apple's frameworks. Basic navigation employs dot notation to traverse dictionary keys, such as root.key.subkey, where each segment specifies a successive dictionary key. For arrays, access to specific elements uses indexed notation like array[0] in supported contexts, though in command-line tools like plutil, this may appear as array.0 to denote the zero-based index of the element. Advanced expressions incorporate collection operators prefixed with @ to aggregate or transform data across array elements, providing functionality beyond simple traversal. For instance, @count returns the number of items in a collection (e.g., children.@count yields the count of child objects), while @sum computes the total of numeric values for a specified property (e.g., [email protected] sums all amount values in the transactions array). Other operators include @avg for averages, @min and @max for extrema, @distinctUnionOfObjects for unique values, and @unionOfObjects for all values including duplicates; these require a right key path following the operator to specify the target property. Wildcards (*) can be used in some API contexts to match multiple keys or elements, and ranges (e.g., [0:5]) may denote subsets of arrays, though support varies by implementation. These operators apply directly to property list structures, as NSDictionary and NSArray conform to KVC protocols. In usage contexts, path expressions are integral to command-line tools and scripting. The defaults command supports basic key paths for reading user defaults (e.g., defaults read com.example.app root.key.subkey), which query property lists stored in the defaults system. For more complex extraction from arbitrary plist files, plutil -extract [path](/page/Path) raw file.plist uses KVC-style paths to output values, such as plutil -extract preferences.[window](/page/Window).[size](/page/Size) file.plist to retrieve a nested size value. In programming interfaces like Foundation's NSUserDefaults or Core Foundation's CFPreferences, paths enable scripted queries, for example, retrieving aggregated app preferences: let sum = dictionary.value(forKeyPath: "[email protected]") as? Double. These tools facilitate automation in shell scripts or apps without loading entire plists into memory. Limitations of this language include its read-only nature in many contexts, as KVC paths via valueForKeyPath: do not support creation or modification—use setValue:forKeyPath: separately for writes. It lacks full support for complex filters like [?value>10] seen in or JSONPath, relying instead on separate NSPredicate objects for conditional queries (e.g., filtering arrays before applying paths). Invalid paths typically return nil or raise an NSUndefinedKeyException, requiring error handling via try-catch blocks in code or exit codes in tools (e.g., plutil returns non-zero on failure). Compared to or JSONPath, KVC paths prioritize / integration over standalone querying, omitting advanced recursion or regex but excelling in collection aggregations for plist data. For example, to query nested app preferences in a plist representing settings, a like appPreferences.screens.@[count](/page/Count) could available screen configurations, while [email protected] extracts unique names from a recent-files . If the is invalid, such as referencing a non-existent subkey, log an exception, and tools like plutil output an error message like "Unexpected character 0 at line 1," prompting verification of the plist structure.

Cross-Platform Support

Windows Compatibility

Microsoft Windows lacks native support for property lists, necessitating third-party libraries or tools for parsing and editing them, as the format is specific to Apple ecosystems. For instance, developers can use the PlistAPI NuGet package to serialize and deserialize property lists directly into .NET objects on Windows platforms. Additionally, environments like Cygwin enable handling of property lists in cross-compiled macOS applications by providing POSIX compatibility for building cross-compiled applications targeting macOS, though running requires macOS. Key tools for working with property lists on Windows include the integrated PList editor in for Xamarin projects, which allows editing of Info.plist files for apps developed on Windows machines. scripts can also parse XML-formatted property lists using built-in cmdlets like Select-Xml, treating them as standard XML documents for automation and configuration tasks. Interoperability between macOS property lists and Windows is common in enterprise (MDM) scenarios, where administrators export .plist configurations from macOS systems to manage Apple devices via Windows-based tools like . However, the binary property list format presents challenges on Windows due to its use of big-endian byte ordering, contrasting with Windows' little-endian , which requires specialized parsers to correctly interpret and values. In case studies involving cross-platform development, applications leverage property lists for -specific configurations while bridging to Windows targets, allowing developers on Windows to edit -specific configurations in property lists, though building apps requires macOS or cloud-based services that incorporate .plist files for app and permissions. File associations for .plist extensions in Windows Explorer can be configured through the Settings app to open with tools like Notepad++ or dedicated editors, facilitating direct manipulation without additional software. A significant limitation is the absence of a built-in defaults system analogous to macOS, where property lists store user preferences; Windows instead uses the Registry for such purposes, prompting reliance on as a more universally supported alternative for cross-platform configuration files. Cross-platform libraries, such as those in the libimobiledevice project, further aid compatibility by providing Windows builds for property list handling.

NetBSD and Unix Variants

In , support for Apple property lists is facilitated through the pkgsrc package collection, which provides libplist, a C library designed to parse and manipulate both binary and XML formats of property lists. This library enables developers to handle serialized data structures commonly used in Apple ecosystems, such as configuration files and application metadata, within NetBSD environments. Libplist was first imported into pkgsrc around 2011, allowing seamless integration for tools requiring compatibility with macOS or data formats. Other Unix-like systems, including , offer similar capabilities via ports collections that include libplist for full property list handling. In , the devel/libplist port installs the library to support binary and XML property list operations, often used in utilities for device management or cross-platform development. For XML-based property lists, and other variants leverage general-purpose XML parsers, but libplist provides specialized tools like plistutil for conversion between formats. Additionally, Linux distributions such as include libplist in their repositories, enabling property list processing in user-space applications. Property lists lack native support at the kernel level in and other Unix variants, as they are not integral to core operating system functionality; instead, they are processed entirely in user space through libraries and daemons. For instance, user-space daemons in environments like on may indirectly interact with property lists via for parsing XML configurations in desktop settings or Apple-compatible software, though primary configuration relies on other formats like INI or GSettings schemas. serves as a foundational XML parser for handling the structured data in XML property lists across these systems. Developments in Unix property list support emphasize portability, particularly in managing Apple's binary format, which uses big-endian encoding for multi-byte values. Libraries like libplist automatically handle byte-order conversions on little-endian architectures prevalent in modern Unix systems (e.g., x86-based or ), ensuring compatibility without manual intervention. This is crucial for tools processing plists from Apple devices on non-Apple . An example of practical use includes build systems where RPM specifications are adapted for macOS ; utilities leveraging libplist can convert or generate property list equivalents for during cross-compilation workflows on Unix platforms.

Third-Party Libraries

Several open-source libraries facilitate the handling of property lists across various programming languages and platforms, enabling developers to parse, generate, and manipulate these files without relying on Apple-specific APIs. One prominent example is libplist, a portable C library developed as part of the libimobiledevice project, which supports reading and writing property lists in binary, XML, , and formats. It is widely used in forensics and device management tools due to its lightweight design and cross-platform compatibility. In , plistlib serves as a built-in since 2.3, providing straightforward functions for serializing and deserializing property lists in both XML and binary formats. This is particularly valued for its simplicity in scripting tasks involving macOS configuration files. For applications, especially in enterprise environments, options include dd-plist, an MIT-licensed library that parses and generates property lists in multiple formats, and Configuration's PropertyListConfiguration class, which handles ASCII plist files with support for date extensions. In ecosystems, the plist package offers robust parsing and building capabilities for property lists, making it suitable for server-side and browser-based applications interacting with macOS data. Commercial software also leverages property list handling through integrated libraries or custom implementations. The Unity game engine, for instance, manages property lists during iOS builds by generating and modifying Info.plist files via its Xcode project structure, supporting cross-platform asset configuration. Similarly, Adobe Creative Cloud applications utilize property lists for deployment and launch agent configurations, with tools like plist editors in their admin guides for customizing authentication and installation behaviors. These libraries typically offer comprehensive features such as full read/write operations, schema validation for structural integrity, and format conversions between binary and XML representations to ensure interoperability. Performance benchmarks indicate that implementations like the Rust crate plist-rs, released in 2016 and actively maintained since, achieve parsing speeds equivalent to Apple's native Foundation framework, making it efficient for high-throughput applications in modern Rust projects. As of 2025, libplist (version 2.5+) includes improved handling for Apple Silicon architectures and enhanced security features in binary plists. Community-driven updates have addressed security concerns, including patches for vulnerabilities akin to CVE-2023-27937, which involves integer overflows in plist parsing that could lead to app crashes or code execution; affected libraries like libplist have incorporated fixes to mitigate such risks in non-Apple environments.

References

  1. [1]
    plist format - Google Code
    Property list files (plist) are a general serialization format mainly used in NeXTSTEP-derived operating systems, including iPhoneOS.
  2. [2]
    plistlib — Generate and parse Apple .plist files — Python 3.14.0 ...
    The property list ( .plist ) file format is a simple serialization supporting basic object types, like dictionaries, lists, numbers and strings. Usually the top ...Missing: computing | Show results with:computing<|control11|><|separator|>
  3. [3]
    About Information Property List Files - Apple Developer
    Jun 4, 2018 · About Information Property List Files. An information property list file is a structured text file that contains essential configuration ...
  4. [4]
    property list (PLIST) - Jamf Platform Technical Glossary
    Mar 3, 2025 · A file format used with Apple operating systems for storing configuration data and application settings in a structured, hierarchical format.
  5. [5]
    Introduction to Property List Programming Topics for Core Foundation
    Apr 23, 2013 · Explains how to use structured, textual representations of data in Core Foundation.Missing: definition | Show results with:definition
  6. [6]
    PropertyListSerialization | Apple Developer Documentation
    A property list is itself an array or dictionary that contains only NSData , NSString , NSArray , NSDictionary , NSDate , and NSNumber objects. Property list ...
  7. [7]
    JSON vs Property Lists, Revisited - The Atomic Birdhouse
    Mar 3, 2020 · Converting between JSON and property lists often works but can fail due to conflicts in data types. But, why? Why convert JSON to a property list?
  8. [8]
  9. [9]
    Property List XML Tags - Apple Developer
    Apr 23, 2013 · ... Property Lists for an example XML data generated from a property list. Table 1 Core Foundation Types with XML Equivalents. CF type. XML tag.
  10. [10]
    Property list - Apple Developer
    Apr 6, 2018 · Property list. A property list is a representation of a hierarchy of objects that can be stored in the file system and reconstituted later.
  11. [11]
    None
    Below is a merged summary of property lists in the OpenStep Specification (October 19, 1994), consolidating all information from the provided segments into a single, comprehensive response. To maximize detail and clarity, I’ve organized key information into tables where appropriate, while retaining narrative sections for context and explanations. The response avoids redundancy, integrates all relevant details, and includes historical context and useful URLs.
  12. [12]
    PropertyListSerialization.PropertyListFormat.openStep
    Specifies the ASCII property list format inherited from the OpenStep APIs.
  13. [13]
    PropertyList-1.0.dtd - Apple
    Missing: schema | Show results with:schema
  14. [14]
    Mac Automation Scripting Guide: Working with Property List Files
    Jun 13, 2016 · Listing 35-1 demonstrates how to create a new property list file. First, an empty plist file (class property list file ) is created. Next, ...
  15. [15]
    Apple Open Source
    Insufficient relevant content. The provided URL (https://opensource.apple.com/source/CF/CF-550/CFBinaryPList.c) returns a "page not found" error, offering only a link to the Apple Open Source homepage (/). No information about the binary plist structure, including headers, trailers, object types, byte codes, packing methods, or references, is available from the content.
  16. [16]
  17. [17]
    XML External Entity Prevention - OWASP Cheat Sheet Series
    An XXE attack occurs when untrusted XML input with a reference to an external entity is processed by a weakly configured XML parser.
  18. [18]
    [PDF] Interlude: Property Lists - NewOSXBook.com
    Binary plists are also found in MacOS, though not as commonly as XML ones. bplist00. Binary property list files are identifiable by a magic of bplist00 (In ...<|control11|><|separator|>
  19. [19]
    com.dd.plist - A Java library for working with property lists - GitHub
    Property lists are files used to store user settings and serialized objects. They originate from the NeXSTEP programming environment and are now a basic part of ...
  20. [20]
    [PDF] OpenStep Programming Reference - NeXT Computers
    2550 Garcia Avenue. Mountain View, CA 94043. U.S.A.. OpenStep Programming Reference. Part No 802-2112-10. Revision A, September 1996. A ...
  21. [21]
    peanuts/GeneralData/Usenet/news/1997/Sys-04
    How to get a messed up NEXTSTEP conf back into out of the box state. 1. Boot into single user mode Type 'Command-Command-~', yes a triple key stroke, to get ...
  22. [22]
    [PDF] OPENSTEP SPECIFICATION - NeXT Computers
    Oct 19, 1994 · This document sets forth the OpenStep application programming interface (API). You may down-load one copy of this specification as long as it is ...
  23. [23]
    GNU & OpenStep - GNUstep.org
    This agreement evolved into the OpenStep specification which was published by NeXT in a first draft back in summer 1994. GNUstep Hype and History. Early on ...
  24. [24]
    Property Lists - GNUstepWiki - GNUstep.org
    Sep 18, 2005 · Introduction. Property lists are used throughout GNUstep to store defaults, program settings, application meta information, and so on.
  25. [25]
    NSPropertyListSerialization class documentation - GNUstep
    The NSPropertyListSerialization class provides facilities for serialising and deserializing property list data in a number of formats. A property list is ...Missing: GSPropertyListSerialization | Show results with:GSPropertyListSerialization
  26. [26]
    GNUstep Base
    GNUstep always generates legal XML, at the cost of a certain degree of compatibility. GNUstep XML property lists use a backslash to escape illegal characters, ...
  27. [27]
    gnustep/tools-make: The makefile package is a simple, powerful and ...
    The makefile package is a simple, powerful and extensible way to write makefiles for a GNUstep-based project.<|control11|><|separator|>
  28. [28]
    Gorm Manual - GNUstepWiki
    Nov 11, 2007 · Gorm is an application for creating the user interface (and possibly entire applications) for a GNUstep application.
  29. [29]
    [PDF] Guide to the Gorm application - GNUstep
    This allows the user to select from a list of cell subclasses and set the appropriate custom or non-custom one they want to appear in that column of the table.
  30. [30]
    Developer Guides - GNUstep Wiki
    Apr 3, 2025 · Using Property Lists​​ A regular issue that programmers face is storing structured configuration information, and reading it back. GNUstep has a ...Missing: framework | Show results with:framework
  31. [31]
    State of gnustep interop - Compiler - Swift Forums
    Aug 5, 2021 · Does anyone know the latest state of interoping with gnustep? 2 years ago I saw a post about how to use dynamicCallable's to pass messages to the gnustep objc ...#7 by austintatious - Compiler#6 by Gregory_CasamentoMore results from forums.swift.orgMissing: 2025 | Show results with:2025
  32. [32]
    PLUTIL(1)
    DESCRIPTION. plutil can be used to check the syntax of property list files, or convert a plist file from one format to another.
  33. [33]
    Edit property lists in Terminal on Mac - Apple Support
    To edit property lists, use the defaults command-line tool. The defaults command is a powerful tool and, when you know the specific key and value in a property ...
  34. [34]
    defaults Man Page - macOS - SS64.com
    Defaults allows users to read, write, and delete macOS user defaults from a command-line shell. macOS applications and other programs use the defaults system ...
  35. [35]
    plutil(1) — gnustep-base-runtime — Debian unstable
    Jun 27, 2024 · The plutil utility can be used to edit property lists, to verify the syntax, or to convert from one format to another.Missing: open | Show results with:open
  36. [36]
    samyk/samytools - GitHub
    Simple tools to make reverse engineering and console cowboying easier, primarily by data translation and manipulation + file handle piping.
  37. [37]
    Editing Property Lists with plutil - Scripting OS X
    Nov 22, 2016 · These allow you to directly manipulate keys and values in a property list. This may be useful to replace PListBuddy and defaults to manipulate property lists.
  38. [38]
    defaults – the Plist Killer - Scripting OS X
    Feb 26, 2018 · The defaults will delete a property list file with invalid plist/XML syntax, even when you just attempt to read data.
  39. [39]
    Using the plutil command line tool to work with JSON on macOS ...
    Apr 15, 2023 · Another available option is to use the plutil command line tool on macOS Monterey and later to do the following: Read values from JSON files ...
  40. [40]
    PropertyListEncoder | Apple Developer Documentation
    An object that encodes instances of data types to a property list.
  41. [41]
    PropertyListDecoder | Apple Developer Documentation
    Creates a new, reusable property list decoder. ... Returns a value of the specified type by decoding a property list using the default property list format.
  42. [42]
  43. [43]
    CFPropertyList | Apple Developer Documentation
    CFPropertyList provides functions that convert property list objects to and from several serialized formats such as XML.
  44. [44]
    CFPropertyListIsValid(_:_:) | Apple Developer Documentation
    true if the object graph rooted at plist is a valid property list graph—that is, the property list contains no cycles, only contains property list objects, and ...
  45. [45]
    Serializing Property Lists - Apple Developer
    Jul 17, 2012 · The NSPropertyListSerialization class provides the serialization methods that convert property list objects to and from either an XML or an ...
  46. [46]
    CFPropertyListFormat | Apple Developer Documentation
    Error codes for property list reading and writing functions such as CFPropertyListCreateWithData(_:_:_:_:_:) .
  47. [47]
    Key-Value Coding Programming Guide: Accessing Object Properties
    Oct 27, 2016 · Key paths are useful for drilling down into a hierarchy of objects with a single method call. For example, the key path owner.address.street ...
  48. [48]
    Key-Value Coding Programming Guide: Using Collection Operators
    Oct 27, 2016 · When you send a key-value coding compliant object the ... All the collection operators except @count require a right key path.
  49. [49]
    PlistAPI 1.2.0 - NuGet
    Dec 11, 2023 · Plist API that allows to serialize and deserialize directly as a specific objects.
  50. [50]
    How can I open and edit Info.plist and Entitlements.plist in Visual ...
    Oct 26, 2022 · I have created a new iOS project in VS for Mac 2022 but I don't know how to open Info.plist and Entitlements.plist correctly.
  51. [51]
    Select-Xml (Microsoft.PowerShell.Utility)
    The command uses the Xml parameter to specify the XML content in the $Types variable and the XPath parameter to specify the path to the MethodName node.Missing: plist | Show results with:plist
  52. [52]
    Add preference file settings to macOS devices in Microsoft Intune
    Mar 3, 2025 · Using Microsoft Intune, you can add a property list file ( .plist ) for macOS devices, or apps on macOS devices. This feature applies to:.
  53. [53]
    Apple Property List: Comparing the Mac OS X ... - Forensic Focus
    May 12, 2020 · This paper will introduce the Property Lists in the Apple OS X and compare them to the Microsoft Windows Registry.<|control11|><|separator|>
  54. [54]
    React Native iOS App Development on Windows: A Guide
    Jul 20, 2024 · In this comprehensive guide, we will walk you through the necessary steps and tools required for React Native iOS app development on Windows.
  55. [55]
    How File Associations Work - Win32 apps - Microsoft Learn
    Jan 7, 2021 · Application developers can use file associations to control how the Shell treats custom file types, or to associate an application with existing file types.<|separator|>
  56. [56]
  57. [57]
    FreshPorts -- devel/libplist: Library to handle Apple Property List format
    Feb 28, 2011 · To add the package, run one of these commands: pkg install devel/libplist; pkg install libplist. NOTE: If this package has multiple flavors (see ...Missing: NetBSD parsing
  58. [58]
    Libxml2 - GitLab - GNOME
    May 23, 2018 · libxml2 is an XML toolkit implemented in C, originally developed for the GNOME Project. Official releases can be downloaded from https://download.gnome.org/ ...
  59. [59]
    libimobiledevice/libplist: A library to handle Apple Property ... - GitHub
    Oct 22, 2024 · A small portable C library to handle Apple Property List files in binary, XML, JSON, or OpenStep format.Missing: NetBSD pkgsrc
  60. [60]
    Class PropertyListConfiguration - Apache Commons
    This configuration can read and write ASCII plist files. It supports the GNUStep extension to specify date objects. References: Apple Documentation - Old-Style ...
  61. [61]
  62. [62]
    Manual: Structure of a Unity Xcode project
    Property list (.plist) file. You can manage the Info.plist file within the Unity-iPhone target (accessed via mainBundle ) from Unity's Player Settings window ...
  63. [63]
    Deploy packages for Adobe Creative Cloud
    Dec 16, 2024 · Open the Info.plist file at the following location: [package]/Build/xyz_install.pkg/Contents/Info.plist. Add the following entry with the ...Windows · Microsoft Intune · Sign in
  64. [64]
    conradev/plist-rs: Property list parser in Rust - GitHub
    plist-rs is a property list parser written in Rust. Features. Supports reading both XML and binary property lists; Equivalent performance to Apple's ...
  65. [65]