Type Method


Writes a property list to the specified stream.


+ (NSInteger)writePropertyList:(id)plist toStream:(NSOutputStream *)stream format:(NSPropertyListFormat)format options:(NSPropertyListWriteOptions)opt error:(out NSError * _Nullable *)error;



The property list that you want to write out.


An NSOutputStream instance that is open and ready to receive the property list data.


One of the property list formats defined in NSPropertyListFormat.


Currently unused. Set to 0.


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.

See Also

Serializing a Property List

+ dataWithPropertyList:format:options:error:

Returns an NSData object containing a given property list in a specified format.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software