CKModifyRecordsOperation Always Returns an Error

How come my CKModifyRecordsOperation always returns with an error now? This API call has worked for many years. What has changed?


let modifyOperation : CKModifyRecordsOperation = CKModifyRecordsOperation(recordsToSave: [testRecord], recordIDsToDelete:nil)

modifyOperation.savePolicy = CKRecordSavePolicy.allKeys

modifyOperation.database = CKContainer.default().privateCloudDatabase

modifyOperation.modifyRecordsCompletionBlock = { savedRecords, deletedRecordIDs, error in

if (error == nil) {

} else {

//Always ends up here now

}

}

OperationQueue.main.addOperation(modifyOperation)

Replies

what is the value of 'error'?