YDBCKRecord

@interface YDBCKRecord : NSObject <NSCoding>

/**
 * This method serializes just the "system fields" of the given record.
 * That is, it won't store any of the user-created key/value pairs.
 * It only stores the CloudKit specific stuff, such as the versioning info, syncing info, etc.
 */
+ (NSData *)serializeRecord:(CKRecord *)record;

/**
 * Deserialize the given record data.
 *
 * If the record data came from [YDBCKRecord serializeRecord:],
 * then the returned record will only contain the "system fields".
 */
+ (CKRecord *)deserializeRecord:(NSData *)data;

#pragma mark Instance

- (instancetype)initWithRecord:(CKRecord *)record;

@property (nonatomic, strong, readonly) CKRecord *record;

@end

Undocumented

  • This method serializes just the system fields of the given record. That is, it won’t store any of the user-created key/value pairs. It only stores the CloudKit specific stuff, such as the versioning info, syncing info, etc.

    Declaration

    Objective-C

    + (nonnull NSData *)serializeRecord:(nonnull CKRecord *)record;

    Swift

    class func serializeRecord(_ record: CKRecord) -> Data
  • Deserialize the given record data.

    If the record data came from [YDBCKRecord serializeRecord:], then the returned record will only contain the system fields.

    Declaration

    Objective-C

    + (nonnull CKRecord *)deserializeRecord:(nonnull NSData *)data;

    Swift

    class func deserializeRecord(_ data: Data) -> CKRecord
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithRecord:(CKRecord *)record;

    Swift

    init(record: CKRecord)
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) CKRecord *record

    Swift

    var record: CKRecord { get }