Initializer

init(archivableObject:)

Creates an attachment from an object that conforms to NSSecureCoding.

Declaration

convenience init(archivableObject object: NSSecureCoding)

Parameters

object

An encodable object that conforms to NSSecureCoding.

Discussion

Creates an attachment with a uniformTypeIdentifier of "public.data".

See Also

Creating Attachments from Objects

init(plistObject: Any)

Creates an attachment from an object that can be represented in an XML property list.

init(archivableObject: NSSecureCoding, uniformTypeIdentifier: String)

Creates an attachment from an object that conforms to NSSecureCoding, with a custom UTI.