如何使用 CKReference cloudkit IOS Swift 为数据库创建良好的结构?

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

我正在创建基于 cloudkit 的应用程序,我必须在其中创建数据库结构。我被困在 CKReference 中。我如何使用 CKReference 创建良好的数据库结构

"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."

试试这些链接(第二个可能会直接回答您的问题):

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

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