Instructs the receiver to construct the final data stream.
- iOS 2.0+
- macOS 10.2+
- tvOS 9.0+
- watchOS 2.0+
- Mac Catalyst 13.0+Beta
No more values can be encoded after this method is called. You must call this method when finished.
class func archiveRootObject(Any, toFile: String) -> Bool
Archives an object graph rooted at a given object by encoding it into a data object then atomically writes the resulting data object to a file at a given path, and returns a Boolean value that indicates whether the operation was successful.
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