Type Method

dataWithPropertyList:format:options:error:

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

Declaration

+ (NSData *)dataWithPropertyList:(id)plist format:(NSPropertyListFormat)format options:(NSPropertyListWriteOptions)opt error:(out NSError * _Nullable *)error;

Parameters

plist

A property list object.

format

A property list format. For possible values, see NSPropertyListFormat.

opt

The opt parameter is currently unused. No options should be specified.

error

If the method does not complete successfully, upon return contains an NSError object that describes the problem.

Return Value

An NSData object containing plist in the format specified by format.

Discussion

See Also

Serializing a Property List

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