0
votes

the CKRecord Class reference says that one can use the encodeSystemFieldsWithCoder method of CKRecord to encode the metadata of the record. But why would I need to do archive this data for what purpose? Can someone provide an example? The metadata is:

  1. recordID
  2. recordType
  3. creationDate
  4. creatorUserRecordID
  5. modificationDate
  6. lastMOdifiedUserRecordID
  7. recordChangeTage

thanks

1

1 Answers

3
votes

You could use that when you archive a record in a database, file or settings or so. Then when you want to make an update to that record, you can recreate the CKRecord with all the system fields and then write the update. Otherwise you first had to read the record, make the updates and then write it to CloudKit.