YapDatabaseCloudKitRecordHandler

@interface YapDatabaseCloudKitRecordHandler : NSObject

The RecordHandler is the primary mechanism that is used to tell YapDatabaseCloudKit about CKRecord changes. That is, as you make changes to your own custom data model objects, you can use the RecordHandler block to tell YapDatabaseCloudKit about the changes that were made by handing it CKRecords.

Here’s the general idea:

  • You update an object in the database via the normal setObject:forKey:inCollection method.
  • Since

    Since YapDatabaseCloudKit is an extension, it’s automatically notified that you modified an object.
  • YapDatabaseCloudKit then invokes the recordHandler, and passes you the modified object, along with an empty base CKRecord (if available), and asks you to set the proper values on the record.
  • Afterwards, the extension will check to see if it needs to upload the CKRecord (if it has changes), and handles the rest if it does.
  • For more information & sample code, please see the wiki: https://github.com/yapstudios/YapDatabase/wiki/YapDatabaseCloudKit#RecordHandlerBlock