You’ll need an iCloud account to save records to a CloudKit container.
You’ll enter the credentials for this iCloud account on the device that you run your app.
If you don’t have an iCloud account, create one that you can use during development.
On your Mac, launch System Preferences and click iCloud. Click Create Apple ID under the
Apple ID text field and follow the instructions.
In development, when you run your app through Xcode on a simulator or a device, you need to
enter iCloud credentials to read records in the public database. In production, the default
permissions allow non-authenticated users to read records in the public database but do not
allow them to write records.