Writes a property list to the specified stream.
SDKs
- iOS 4.0+
- macOS 10.6+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
class func writePropertyList(_ plist: Any, to stream: Output Stream, format: Property List Serialization.Property List Format, options opt: Property List Serialization.Write Options, error: NSError Pointer) -> Int
Parameters
plist
The property list that you want to write out.
stream
An
Output
instance that is open and ready to receive the property list data.Stream format
One of the property list formats defined in
Property
.List Serialization .Property List Format opt
Currently unused. Set to
0
.error
A pointer that the function may set to an
NSError
object when an error occurs to provide additional information about the error.
Return Value
The number of bytes written to the stream. A return value of 0
indicates that an error occurred.