RealmSwiftAdapterRecordProcessing
public protocol RealmSwiftAdapterRecordProcessing: class Inheritance#
class
Requirements#
shouldProcessPropertyBeforeUpload(propertyName:object:record:)#
func shouldProcessPropertyBeforeUpload(propertyName: String, object: Object, record: CKRecord) -> Bool- Called by the adapter before copying a property from the Realm object to the CloudKit record to upload to CloudKit.
- The method can then apply custom logic to encode the property in the record.
- @param propertyname The name of the property that is being processed
- @param object   The RLMObjectthat is going to have its record uploaded.
- @param record   The CKRecordthat is being configured before being sent to CloudKit.
- @return Boolean indicating whether the adapter should process property normally. Return false if property was already handled in this method.
shouldProcessPropertyInDownload(propertyName:object:record:)#
func shouldProcessPropertyInDownload(propertyName: String, object: Object, record: CKRecord) -> Bool- Called by the adapter before copying a property from the CloudKit record that was just downloaded to the Realm object.
- The method can apply custom logic to save the property from the record to the object. An object implementing this method should not change the record itself.
- @param propertyname The name of the property that is being processed
- @param object   The RLMObjectthat corresponds to the downloaded record.
- @param record   The CKRecordthat was downloaded from CloudKit.
- @return Boolean indicating whether the adapter should process property normally. Return false if property was already handled in this method.