2014-07-15 71 views
0

我嘗試從雲套件容器中獲取用戶記錄。我請求許可,但現在,此時我獲得了返回值CouldNotComplete。爲什麼,問題在我身邊?爲什麼在CloudKit中請求權限會返回CouldNotComplete?

defaultContainer.requestApplicationPermission(.PermissionUserDiscoverability, {status, error in 

    if status == CKApplicationPermissionStatus.Granted { 

    } else if status == CKApplicationPermissionStatus.CouldNotComplete { 
     println(error.userInfo) 
    } 

這是確切的錯誤消息:

[NSErrorFailingURLStringKey: https://configuration.apple.com/configurations/internetservices/cloudkit/cloudkit-1.0.plist , _kCFStreamErrorCodeKey: 57, NSErrorFailingURLKey: https://configuration.apple.com/configurations/internetservices/cloudkit/cloudkit-1.0.plist , _kCFStreamErrorDomainKey: 1, NSDebugDescription: NSURLErrorDomain: -1005, NSUnderlyingError: Error Domain=NSURLErrorDomain Code=-1005 "The operation couldn’t be completed. (NSURLErrorDomain error -1005.)" UserInfo=0x7b96fb30 {NSErrorFailingURLStringKey= https://configuration.apple.com/configurations/internetservices/cloudkit/cloudkit-1.0.plist , _kCFStreamErrorCodeKey=57, NSErrorFailingURLKey= https://configuration.apple.com/configurations/internetservices/cloudkit/cloudkit-1.0.plist , _kCFStreamErrorDomainKey=1}]

回答

0

在不知何故,我忘了登錄在模擬器我的iCloud帳戶,這就是爲什麼我得到這個錯誤。

相關問題