找出CloudKit中哪个recordType导致权限错误

时间:2015-10-03 20:27:40

标签: ios xcode swift debugging cloudkit

修改记录时出现此错误,但不知道哪个recordType引发了异常。有任何想法想出来吗?

[NSDebugDescription: CKInternalErrorDomain: 1011, RequestUUID: 5BF276EF-2246-4B7C-A80B-C085FB74F084, ContainerID: iCloud.com.xxx, NSUnderlyingError: <CKError 0x15eb1a80: "Partial Failure" (1011); "Failed to modify some records"; partial errors: {
    tt0172495:(_defaultZone:__defaultOwner__) = <CKError 0x15dddf10: "Permission Failure" (10/2007); server message = "WRITE operation not permitted">
}>, CKPartialErrors: {
    "<CKRecordID: 0x15e607a0; tt0172495:(_defaultZone:__defaultOwner__)>" = "<CKError 0x15dddf10: \"Permission Failure\" (10/2007); server message = \"WRITE operation not permitted\"; uuid = 5BF276EF-2246-4B7C-A80B-C085FB74F084; container ID = \"iCloud.com.xxx\">";
}, CKErrorDescription: Failed to modify some records, NSLocalizedDescription: Failed to modify some records]

并使用此方法:

let mro = CKModifyRecordsOperation(recordsToSave: recordsToSave, recordIDsToDelete: recordIDsToDelete)
mro.modifyRecordsCompletionBlock = {saveRecords, deleteRecordsID, error in

如果用户想要写记录并且CloudKit中已经存在具有相同recordID的记录会发生什么,但用户无权修改该记录类型?

如果to记录具有完全相同的属性,那么基本上该操作将无效。它可以提出这样的例外吗?

0 个答案:

没有答案