我可以将CloudKit数据传输到新的Container吗? [英] Can I transfer CloudKit data to a new Container?
问题描述
我正在制作一个CloudKit应用程序,我面临将数据存储在默认容器中的选择,该默认容器只能由该应用程序访问,也可以存储在可以共享数据的自定义容器中.现在,我只需要该应用程序即可访问数据,因此我可能会将数据放入默认容器中.但是,如果最终我想从其他应用程序访问此数据,我可以将用户数据传输到自定义的可共享容器中吗?
I'm making a CloudKit app, and I'm faced with the choice of storing my data in the default container, accessible only by that app, or a custom container that can share data. For now I only need that app to access the data, so I would probably put my data in the default container. However, if eventually I want to access this data from a different app, can I transfer my user data to a custom, shareable container?
推荐答案
无需传输数据:可以从其他应用程序使用默认容器.
No need to transfer your data: the default container can be used from your other apps.
您可以在新应用程序的CloudKit功能中指定原始应用程序默认容器的名称,然后使用它初始化CKContainer来访问它.
You can specify the name of your original app's default container in your new app's CloudKit capabilities and then use it to initialise a CKContainer to access it.
这篇关于我可以将CloudKit数据传输到新的Container吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!