CloudKit private container for multiple users

I have a Mac business app which would store data in Cloudkit. A typical company whould have multiple users. I store the data in a core database on the Mac. I would like to use cloudkit to facilitate keeping the databases in synch. The way I understand it, cloudkit allows a public database which all users of the app could access. There is also a private database for each user. I want each of the companies to have their own container for that company's data. If I put the data in a private container, then it seems like the users would all need the same user id, which would be very inconvenient for the users. If I put the data in the public container, all companies would have their data in the public container. As this is all confidential financial data, I don't think the customers would like this.


Is there a way to set up a private container which is accessible to multiple users? I think that would solve the issue.

Replies

With the current implementation of CloudKit, I believe there is not API level support for the kind of shared private containers or access control you describe. You would have to roll your own solution on top of the public database, providing your own access control strategy, and perhaps encrypting data stored in the public container.


Several people have expressed interest in this. I would suggest you file a feature request.


https://developer.apple.com/bug-reporting/

Has this situation changed since your post over 2 years ago?