Member-only story
CloudKit in iOS
Registering app for use with CloudKit
What you need is to get an entitlements file so the app can access your iCloud and write records using CloudKit.
Follow the steps to grant access to iCloud from your app:
1- Select the project in the Project Navigator, and then open the General tab.
2- In the Identity section, set your developer Apple ID to the Team dropdown menu. (If it is not available, add it in Xcode menu -> Preferences -> Accounts.
3- Go to Capabilities tab in the project properties and turn iCloud on. Then, select “Key-Value Storage” and “CloudKit”.
If all of the items are checked, then your app is ready to use CloudKit.
Using CloudKit Dashboard
All the records create using CloudKit-related code can be previewed, edited and even removed in CloudKit Dashboard
There are several parts in the dashboard:
Record Types (which will be discussed later)
Security Roles (which is where you can set databases as public or private)
Subscription Types (which your app could register for Apple Push Notifications (APNs) to notify you when a record is changed)
Record Types
Here, you get a list of all the existing record types in the app. When you first open CloudKit Dashboard for an app, there’s a record type called Users there, which you can use it or just delete it and use your own.
In this page, you could make your data typed manually. Of course, in most cases this is pointless, because iOS SDK can handle it way better than the dashboard, but the functionality is also there if you prefer. The most use of this page is for previewing types