CloudKit iOS 10 错误:帐户无权访问 CloudKit 帐户

Posted

技术标签:

【中文标题】CloudKit iOS 10 错误:帐户无权访问 CloudKit 帐户【英文标题】:CloudKit iOS 10 Error: Account doesn't have access to CloudKit account 【发布时间】:2016-09-28 12:36:39 【问题描述】:

由于某种原因,我在 ios 10 上的一小部分用户无法从我的公共 iCloud 容器中读取数据。

CloudKit 返回的 localisedError 是“Account doesn't have access to CloudKit account”,但是在网上搜索后,我找不到任何关于此错误的提及。

有没有人知道是什么原因造成的?下面的示例代码示例。

let sortDescriptor = NSSortDescriptor.init(key: "Version", ascending: false)
let publicDatabase = CKContainer(identifier:"iCloud.blah.blah.blah").publicCloudDatabase
let truePredicate = NSPredicate(value: true)
let VersionQuery = CKQuery(recordType: "Version", predicate: truePredicate)

VersionQuery.sortDescriptors = [sortDescriptor]

publicDatabase.performQuery(VersionQuery, inZoneWithID: nil)  (record, error) -> Void in
        print("Cloudkit Error = \(error?.localizedDescription)")

【问题讨论】:

这里也一样。 CF:forums.developer.apple.com/thread/64412 这看起来像你同样的问题。我开始在 iOS 10.1 测试版上遇到这个问题,值得。 我收到了同样问题的报告 - 据报道,用户也没有在测试版上。 【参考方案1】:

我也有这个问题。似乎关闭 iCloud Drive(运行 iOS 10)的用户无法访问公共容器中的数据。一旦他们启用了 iCloud Drive,他们就可以再次访问公共容器。我不确定为什么会发生这种情况并已提交错误报告。

【讨论】:

以上是关于CloudKit iOS 10 错误:帐户无权访问 CloudKit 帐户的主要内容,如果未能解决你的问题,请参考以下文章

无法访问 CloudKit 出现奇怪错误:内部错误 (1/2005)

iTunes Connect 登录错误 - Apple ID 无权访问 iTunes Connect

更改 iOS 模拟器 iCloud 帐户

Azure 函数访问存储帐户

Heroku:您的帐户 example@email.com 无权访问 <app-name>

Cloudkit 身份验证仅适用于我的 alt 帐户,不适用于 Dev 或 Tester 帐户