CloudKit share private Container between users

爷,独闯天下 提交于 2019-12-06 07:05:38

问题


I'm planning to develop an App used to share infos about geographic locations (coordinates, notes, pics), a kind of Treasure Hunt and I did not understand if it is possible, using CloudKit, to share part of a private container between users. If it is, how can I do that? I'd need to create something like Apple does in the Reminders App, where a user can "invite" other users and have a common list to share between them all where everybody can insert or edit stuff.

Eventually if it's not possible to do it using CloudKit, can I do that with Parse?

Thank you!


回答1:


Data in the private container can not be shared directly. You should use a public container for that functionality. You just have to create the right filters in your app so that you only share the data with the people you want to share the data with.




回答2:


In iOS 10 / macOS 10.12, it is now possible to share hierarchies of records in a user's private database with other users.

An Overview: [WWDC 2016] Session 226 - What's New with CloudKit

If you want to start diving into the new documentation, check out:

  • CKShare

  • CKShareParticipant

  • CKFetchShareParticipantsOperation

  • CKFetchShareMetadataOperation

  • CKAcceptSharesOperation

And this thread in the Apple Developer Forums, which provides some example code.



来源:https://stackoverflow.com/questions/31350136/cloudkit-share-private-container-between-users

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!