2016-04-08 16 views
4

我正面臨一個問題。使用雲套件將圖像上傳到icloud時引發錯誤。它會拋出以下錯誤:使用雲工具包上傳圖像到icloud拋出錯誤ios

(< CKError 0x7ffad06b6780: "Internal Error" (1/5000); "Couldn't create a PCS identity">) 

當圖像未與其他數據一起上傳時,則其他數據已成功上傳。 這裏我提供了用於設置上傳圖片的代碼。

var noteRecord: CKRecord! 
if let url = imageURL { 
    let imageAsset = CKAsset(fileURL: url) 
    print("imageAsset \(imageAsset)") 
    noteRecord.setObject(imageAsset, forKey: "noteImage") 
} 
+0

什麼你在打印了? 'print(「imageAsset \(imageAsset)」)' – Ragnar

+0

如果你做了一個確切的錯誤代碼是什麼:let errorCode:CKErrorCode = CKErrorCode(rawValue:error!.code)! –

+0

@Ragnar當我打印它顯示: -

回答

1

這是用戶能夠在其設備上的一個iCloud的驅動器後與iCloud的鑰匙扣和iCloud的硬盤文件夾中出現特定用戶的問題。

實施例的日誌:

Oct 17 00:38:17 hostname.local com.apple.iCloudHelper[1284] : 
PCSIdentityCollectionSetup: {type = mutable dict, count = 3, entries 
=> 0 : {contents = "kPCSSetupUsername"} = {contents = "appleID"} 1 : {contents = "kPCSSetupDSID"} = {contents = "<>"} 2 : {contents = 
"kPCSSetupPassword"} = {contents = "<>"} } Oct 17 00:38:17 
hostname.local com.apple.iCloudHelper[1284] : 
__PCSAccountHasStingrayIdentities Oct 17 00:38:19 hostname.local com.apple.iCloudHelper[1284] : PCSHasStingrayIdentities: YES Oct 17 
00:38:21 hostname.local com.apple.iCloudHelper[1284] : 
PCSCopyStingrayIdentity: {length = 1845, capacity = 1845, bytes = 
0x628207313082072d0c0f67616d63616c ... ab42b25d58020101} (error: 
(null)) Oct 17 00:38:21 hostname.local com.apple.iCloudHelper[1284] : 
PCSIdentityCollectionSetup failed The operation couldn’t be completed. 
(OSStatus error -25244 - SecItem failed to delete on private identity) 

用戶的當前設備上的iCloud鑰匙扣同步(或他們只是與他們的帳戶相關聯的任何其他共享設備)或改變的權限/刪除和重建共享的iCloud文件夾的組合與此用戶的鑰匙串/帳戶相關聯應解決此問題。

相關討論:

Apple Stack Exchange - Setting up iCloud results in cloudd error messages

Apple Support Communities - after upgrading to Yosemite iMac reboots random reboots randomly