In order to efficiently use CloudKit to store data, you must understand how it stores data and what terminology is used for the different components that are used throughout your database. Every CloudKit container comes with a couple of different databases:
- A private database for each user
- A shared database for each user
- A public database that's shared for all users
It's important that you use the correct database whenever you write data to CloudKit, you wouldn't want to accidentally store some sensitive user information in the public database because that could potentially expose the information to all users of your app. You should only use the public database for data that is suited for all users of ...