Is CloudKit sharing really in iOS 10?

Is the CloudKit sharing support announced at WWDC16 actually supported in iOS 10? The documentation for CKShare, UICloudSharingController and friends is still (as of Sept 10, 2016) sparse to nonexistent.


I haven't been able to find any overview of it other than the WWDC presentation, which lacks important details and doesn't quite match the API interfaces any more. The sample code released on Sept 7 says "Add a new Sharing tab with CloudKit Sharing examples (Big new feature for WWDC)." but I can't find anything in the code about it. Even a Google search for "ckshare" or "uicloudsharingcontroller" turn up nothing interesting. And I've tried to get it working on my own, but I've only been able to get a few simple cases to sort of work. I see that the iOS 10 Notes app works pretty well, so maybe it's working for some cases.


Am I missing something? Has anyone else had any luck with it?

Jonny,


Also attempted to place a Subscription on Private DB cloudkit.share as follows:


let shareSubscription = CKQuerySubscription(recordType: "cloudkit.share",

predicate: predicate,

options: [.firesOnRecordCreation, .firesOnRecordUpdate, .firesOnRecordDeletion])


Though this doesn't rigger upon any changes and/or deletion of the share. Handled differently then other Private DB subscriptions it appears.

MY guess is that you are setting sharing permissions on the `UICloudSharingController` but perhaps not on the actual `CKShare` too. I made that mistake and when I added permissions onto the `CKShare` object it worked.


let share = CKShare(rootRecord: record)
share.publicPermission = .readWrite

Very strange: four months later and there still doesn't appear to be documentation or sample code from Apple. I'd really like to continue my work using these APIs but I'm very concerned that they've been orphaned. Or maybe they don't really work? Or don't scale? Can anyone from Apple shed some light on this? pdm? morgen?

Is CloudKit sharing really in iOS 10?
 
 
Q