Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CloudKit share private Container between users

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!

like image 947
DungeonDev Avatar asked Jul 17 '26 07:07

DungeonDev


2 Answers

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.

like image 69
breakingobstacles Avatar answered Jul 19 '26 01:07

breakingobstacles


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.

like image 24
Edwin Vermeer Avatar answered Jul 19 '26 02:07

Edwin Vermeer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!