<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFPropertyList",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@T@CFPropertyListRef"
  },
  "title" : "CFPropertyList"
}
-->

# CFPropertyList

```
typealias CFPropertyList = CFTypeRef
```

## Overview

CFPropertyList provides functions that convert property list objects to and from several serialized formats such as XML. The [`CFPropertyList`](/documentation/CoreFoundation/CFPropertyList) type that denotes CFPropertyList objects is an abstract type for property list objects. Depending on the contents of the XML data used to create the property list, `CFPropertyListRef` can be any of the property list objects: CFData, CFString, CFArray, CFDictionary, CFDate, CFBoolean, and CFNumber. Note that if you use a property list to generate XML, the keys of any dictionaries in the property list must be CFString objects.

It is important to understand that CFPropertyList provides an abstraction for all the property list types—you can think of CFPropertyList in object-oriented terms as being the superclass of CFString, CFNumber, CFDictionary, and so on. When a Core Foundation function returns a `CFPropertyListRef`, it means that the value may be any of the property list types. For example, [`CFPreferencesCopyAppValue(_:_:)`](/documentation/CoreFoundation/CFPreferencesCopyAppValue(_:_:)) returns a `CFPropertyListRef`. This means that the value returned can be a CFString object, a CFNumber object, a CFDictionary object, and so on again. You can use [`CFGetTypeID(_:)`](/documentation/CoreFoundation/CFGetTypeID(_:)) to determine what type of object a property list value is.

You use one of the `CFPropertyListCreate...` functions to create a property list object given an existing property list object, raw XML data (as in a file), or a stream. You can also convert a property list object to XML using the [`CFPropertyListCreateXMLData(_:_:)`](/documentation/CoreFoundation/CFPropertyListCreateXMLData(_:_:)) function. You use the [`CFPropertyListWriteToStream(_:_:_:_:)`](/documentation/CoreFoundation/CFPropertyListWriteToStream(_:_:_:_:)) function to write a property list to an output stream, and validate a property list object using the [`CFPropertyListIsValid(_:_:)`](/documentation/CoreFoundation/CFPropertyListIsValid(_:_:)) function. CFPropertyList properly takes care of endian issues—a property list (whether represented by a stream, XML, or a CFData object) created on a PowerPC-based Macintosh is correctly interpreted on an Intel-based Macintosh, and vice versa.

For code examples illustrating how to read and write property list files, see [Property List Programming Topics for Core Foundation](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFPropertyLists/CFPropertyLists.html#//apple_ref/doc/uid/10000130i) and in particular [Saving and Restoring Property Lists](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFPropertyLists/Articles/Saving.html#//apple_ref/doc/uid/20001175).

## Topics

### Creating a Property List

[`CFPropertyListCreateWithData(_:_:_:_:_:)`](/documentation/CoreFoundation/CFPropertyListCreateWithData(_:_:_:_:_:))

Creates a property list from a given CFData object.

[`CFPropertyListCreateWithStream(_:_:_:_:_:_:)`](/documentation/CoreFoundation/CFPropertyListCreateWithStream(_:_:_:_:_:_:))

Create and return a property list with a CFReadStream input.

[`CFPropertyListCreateDeepCopy(_:_:_:)`](/documentation/CoreFoundation/CFPropertyListCreateDeepCopy(_:_:_:))

Recursively creates a copy of a given property list.

[`CFPropertyListCreateFromXMLData(_:_:_:_:)`](/documentation/CoreFoundation/CFPropertyListCreateFromXMLData(_:_:_:_:))

Creates a property list using the specified XML or binary property list data.

[`CFPropertyListCreateFromStream(_:_:_:_:_:_:)`](/documentation/CoreFoundation/CFPropertyListCreateFromStream(_:_:_:_:_:_:))

Creates a property list using data from a stream.

### Exporting a Property List

[`CFPropertyListCreateData(_:_:_:_:_:)`](/documentation/CoreFoundation/CFPropertyListCreateData(_:_:_:_:_:))

Returns a CFData object containing a serialized representation of a given property list in a specified format.

[`CFPropertyListWrite(_:_:_:_:_:)`](/documentation/CoreFoundation/CFPropertyListWrite(_:_:_:_:_:))

Write the bytes of a serialized property list out to a stream.

[`CFPropertyListCreateXMLData(_:_:)`](/documentation/CoreFoundation/CFPropertyListCreateXMLData(_:_:))

Creates an XML representation of the specified property list.

[`CFPropertyListWriteToStream(_:_:_:_:)`](/documentation/CoreFoundation/CFPropertyListWriteToStream(_:_:_:_:))

Writes the bytes of a property list serialization out to a stream.

### Validating a Property List

[`CFPropertyListIsValid(_:_:)`](/documentation/CoreFoundation/CFPropertyListIsValid(_:_:))

Determines if a property list is valid.

### Data Types

[`CFPropertyListMutabilityOptions`](/documentation/CoreFoundation/CFPropertyListMutabilityOptions)

Type for flags that determine the degree of mutability of newly created property lists.

### Constants

[`CFPropertyListFormat`](/documentation/CoreFoundation/CFPropertyListFormat)

Specifies the format of a property list.

[Property List Mutability Options](/documentation/CoreFoundation/property_list_mutability_options)

Option flags that determine the degree of mutability of newly created property lists.

[Reading and Writing Error Codes](/documentation/CoreFoundation/1429999-reading-and-writing-error-codes)

Error codes for property list reading and writing functions such as [`CFPropertyListCreateWithData(_:_:_:_:_:)`](/documentation/CoreFoundation/CFPropertyListCreateWithData(_:_:_:_:_:)).

## See Also

  [Property List Programming Topics for Core Foundation](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFPropertyLists/CFPropertyLists.html#//apple_ref/doc/uid/10000130i)

  [XML Programming Topics for Core Foundation](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFXML/CFXML.html#//apple_ref/doc/uid/10000138i)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)