简体   繁体   English

Xcode iCloud“将“ iCloud容器”权利添加到您的App ID”

[英]Xcode iCloud “Add the ”iCloud containers“ entitlement to your App ID”

  1. For using iCloud Documents, is Xcode > Preferences > Accounts > Apple ID's role admin? 对于使用iCloud文档,是否Xcode>首选项>帐户> Apple ID的角色管理员?

  2. I tested two accounts. 我测试了两个帐户。

Result : 结果:

admin account - it has error that " Your account already has a valid iOS Development certificate ". 管理员帐户-错误:“ 您的帐户已具有有效的iOS开发证书 ”。

在此处输入图片说明

member account - it has error that " Communication with Apple failed ". 会员帐户-错误“ 与Apple通讯失败 ”。

在此处输入图片说明

How to clear error that "Add the "iCloud containers" entitlement to your App ID"? 如何清除“将“ iCloud容器”权利添加到您的应用程序ID”中的错误?

You need to use in both applications the same custom container ID. 您需要在两个应用程序中使用相同的自定义容器ID。 By default each project creates its own unique container id, but you need to use the same for different project. 默认情况下,每个项目都会创建自己的唯一容器ID,但是对于不同的项目,您需要使用相同的容器ID。

So: 所以:

1) create custom id for the first application, similar to the suggested by XCode. 1)为第一个应用程序创建自定义ID,类似于XCode的建议。 Add it to custom container list. 将其添加到自定义容器列表。

2) Open CloudKit dashboard, to be sure that this container is created in your iTunesConnect account. 2)打开CloudKit仪表板,以确保在您的iTunesConnect帐户中创建了此容器。

3) Open the second project/target and add there the same custom container. 3)打开第二个项目/目标,并在其中添加相同的自定义容器。

Though I am not sure this is an effective way to synchronize databases or other big data. 尽管我不确定这是否是同步数据库或其他大数据的有效方法。 If you want to keep updated client' and admin' databases you can consider CloudKit based per-record synchronization. 如果要保持更新的客户端数据库和管理员数据库,可以考虑基于CloudKit的每条记录同步。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM