Skip to content

Instantly share code, notes, and snippets.

@spotlessicode
Last active September 22, 2017 08:17
Show Gist options
  • Save spotlessicode/3d6a783c464530b68a576c00eb9c53a1 to your computer and use it in GitHub Desktop.
Save spotlessicode/3d6a783c464530b68a576c00eb9c53a1 to your computer and use it in GitHub Desktop.
// Objective-C
CKModifyRecordsOperation *modifyRecordsOperation = [[CKModifyRecordsOperation alloc] initWithRecordsToSave:records recordIDsToDelete:nil];
modifyRecordsOperation.atomic=NO;
modifyRecordsOperation.perRecordCompletionBlock = ^(CKRecord *record, NSError *error) {
//Swift 4.0
let modifyRecordsOperation = CKModifyRecordsOperation(recordsToSave: records, recordIDsToDelete: nil)
modifyRecordsOperation.isAtomic = false
modifyRecordsOperation.perRecordCompletionBlock = {(_ record: CKRecord, _ error: Error?) -> Void in } as? Void)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment