Contents

data(fromPropertyList:format:options:)

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

Declaration

class func data(fromPropertyList plist: Any, format: PropertyListSerialization.PropertyListFormat, options opt: PropertyListSerialization.WriteOptions) throws -> Data

Parameters

  • plist:

    A property list object.

  • format:

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

  • opt:

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

Return Value

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

Discussion

See Also

Related Documentation

  • Archives and Serializations Programming Guide
  • Property List Programming Guide

Serializing a Property List