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