Is there a straightforward way to share private data between two or more users using CloudKit?
Public and private date are obvious, but there doesn\'t seem to be a way t
Using the public database and encrypting the shared content would work. Might not be too much fun because then you would need to share encryption keys.
Technically yes, you can share private data between two our more users with CloudKit. While the data store is public, this does not mean that each user has access to the entire public store. Your design can control access to portions of the public database within each app instance.
By developing an app that uses the public database with unique identifiers for groups of users, and zones using CKRecordZoneNotification for managing notifications, you should be able to create a reasonably secure solution. You decide what reasonably secure means.
Here's a link to Apple's docs for CKRecordZoneNotification
At WWDC 2016, Apple introduced CKShare which addresses this use case. As of Jun 13th, 2016, the beta API is public but undocumented. The sharing API is demonstrated in the WWDC 2016 video What's new with CloudKit, starting at 19:57.
Short answer: YES!
CloudKit Sharing was introduced at WWDC 2016. There is a great overview in the "What's new in CloudKit" session: https://developer.apple.com/videos/play/wwdc2016/226/