<!--
{
  "availability" : [
    "iOS: 2.0.0 - 8.0.0",
    "iPadOS: 2.0.0 - 8.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.2.0 - 10.10.0",
    "tvOS: 9.0.0 - 9.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 2.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFPropertyListCreateFromStream(_:_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFPropertyListCreateFromStream"
  },
  "title" : "CFPropertyListCreateFromStream(_:_:_:_:_:_:)"
}
-->

# CFPropertyListCreateFromStream(_:_:_:_:_:_:)

Creates a property list using data from a stream.

```
func CFPropertyListCreateFromStream(_ allocator: CFAllocator!, _ stream: CFReadStream!, _ streamLength: CFIndex, _ mutabilityOption: CFOptionFlags, _ format: UnsafeMutablePointer<CFPropertyListFormat>!, _ errorString: UnsafeMutablePointer<Unmanaged<CFString>?>!) -> Unmanaged<CFPropertyList>!
```

## Parameters

`allocator`

The allocator to use to allocate memory for the new property list. Pass `NULL` or kCFAllocatorDefault to use the current default allocator.

`stream`

The stream whose data contains the content. The stream must be opened and configured—this function simply reads bytes from the stream. The stream may contain any supported property list type (see [`CFPropertyListFormat`](/documentation/CoreFoundation/CFPropertyListFormat)).

`streamLength`

The number of bytes to read. If `0`, this function will read to the end of the stream.

`mutabilityOption`

A constant that specifies the degree of mutability for the returned property list. See [Property List Mutability Options](/documentation/CoreFoundation/property_list_mutability_options) for descriptions of possible values.

`format`

A constant that specifies the format of the property list. See [`CFPropertyListFormat`](/documentation/CoreFoundation/CFPropertyListFormat) for possible values.

`errorString`

On return, `NULL` if the conversion is successful, otherwise a string that describes the nature of the error. Error messages are not localized, but may be in the future, so they are not suitable for comparison.

    Pass     `NULL`     if you do not wish to receive an error string. Ownership follows the     [The Create Rule](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029)    .

## Return Value

A new property list initialized with the data contained in `stream`. Ownership follows the [The Create Rule](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029).

## Discussion

This function simply reads bytes from `stream` starting at the current location to the end, which is expected to be the end of the property list, or up to the number of bytes specified by `streamLength` if it is not `0`.

### Special Considerations

> Warning:
> This function is obsolete and will be deprecated soon. Use ``doc://com.apple.corefoundation/documentation/CoreFoundation/CFPropertyListCreateWithStream(_:_:_:_:_:_:)`` instead.

---

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)