Instance Method

encodeSystemFields(with:)

Encodes the record’s system fields using the specified archiver.

Declaration

func encodeSystemFields(with coder: NSCoder)

Parameters

coder

An archiver object.

Discussion

Use this method to encode only the system-provided metadata associated with the record. Every record has system-defined keys that correspond to metadata such as the record ID, record type, creation date, and so on. The method encodes those system-defined keys in the specified archiver. This method does not specify any keys you added to the record. It also does not encode the keys returned by the changedKeys() method.

You might use this method when you want to store only the system metadata because the actual record data is stored elsewhere.