I use:
CKModifyRecordsOperation *cKModifyRecordsOperation = [[CKModifyRecordsOperation alloc] initWithRecordsToSave:recordsToAddOrSave recordIDsToDelete:recordsIDsToDelete];
cKModifyRecordsOperation.savePolicy = CKRecordSaveChangedKeys;
cKModifyRecordsOperation.modifyRecordsCompletionBlock = ^( NSArray *savedRecords, NSArray *deletedRecordIDs, NSError *error ) {
if ( error )
{
NSLog(error.description);
}
While this works for some record types, for a specific record type I now get the following error message:
CKError 0x170844bc0: "Invalid Arguments" (12)
This is strange because it worked before, even for this record type.
I've checked the forums and did Google searches but could not find any useful information about this error in the context of CKModifyRecordsOperation
.
I'm not 100% sure of this, but this is what I found in the documentation for
ChangedKeys
:To me that sounds like that key only is for modifying the records, not deleting them.