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

# CFPropertyListCreateWithStream(_:_:_:_:_:_:)

Create and return a property list with a CFReadStream input.

```
func CFPropertyListCreateWithStream(_ allocator: CFAllocator!, _ stream: CFReadStream!, _ streamLength: CFIndex, _ options: CFOptionFlags, _ format: UnsafeMutablePointer<CFPropertyListFormat>!, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<CFPropertyList>!
```

## Parameters

`allocator`

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

`stream`

A CFReadStream that contains a serialized representation of a property list.

`streamLength`

The number of bytes to read from the stream. Pass `0` to read until the end of the stream is detected.

`options`

A [`CFPropertyListMutabilityOptions`](/documentation/CoreFoundation/CFPropertyListMutabilityOptions) constant to specify the mutability of the returned property list—see [Property List Mutability Options](/documentation/CoreFoundation/property_list_mutability_options) for possible values.

`format`

If this parameter is non-`NULL`, on return it will be set to the format of the data. See [`CFPropertyListFormat`](/documentation/CoreFoundation/CFPropertyListFormat) for possible values.

`error`

If this parameter is non-`NULL`, if an error occurs, on return this will contain a CFError error describing the problem. 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 created from the data in `stream`. If an error occurs while parsing the data, returns `NULL`. 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

---

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)