Search code examples
cloudkit

How to use CKReference cloudkit IOS Swift to create good structure for database?


i am creating cloudkit based app where i have to create database structure. I got stuck in CKReference. How i can use CKReference for creating a good database structure


Solution

  • "Design the CloudKit schema to store the portions of your app’s object model that you want to persist. If you are implementing an app from scratch, use the Model-View-Controller design pattern to separate the user interface views from the model objects. Then design a schema that efficiently stores the portions of the object model you want to store in iCloud."

    Try these links (the second one likely answers your question directly):

    https://developer.apple.com/documentation/cloudkit/ckreference

    https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/CloudKitQuickStart/CreatingaSchemabySavingRecords/CreatingaSchemabySavingRecords.html