I'm trying to re-initialize a CloudKit container using the instructions in the docs. This worked in XCode 11 beta 3 or 4 (when I first initialized it), possibly running on Mac OS 10.14.x. I'm now running on Mac OS 10.15 beta 4 (19A512f), running Xcode 11 beta 4, and get "Value of type 'NSPersistentCloudKitContainerOptions' has no member 'shouldInitializeSchema'" for the indicated line below (line 4):
// Initialize the CloudKit schema. This should be toggled off or removed when shipping the app.
let containerId = "iCloud.com."
let options = NSPersistentCloudKitContainerOptions(containerIdentifier: containerId)
--> options.shouldInitializeSchema = true // toggle to false when done, or true to initialize iCloud schema
description.cloudKitContainerOptions = options
I've tried running clean build, running xcode-select -s /Applications/Xcode-beta.app, and building to a different iOS device and consistently get this error. The most up-to-date documentation I can find for NSPersistentCloudKitContainerOptions shows that shouldInitializeSchema is a Boolean variable.
Thought I'd post here before submitting a bug in Feedback.
Thanks!
Thanks. I found documentation in Xcode Core Data framework files
/*
This method creates a set of representative CKRecord instances for all stores in the container
that use Core Data with CloudKit and uploads them to CloudKit. These records are "fully saturated"
in that they have a representative value set for every field Core Data might serialize for the given
managed object model.
After records are successfully uploaded the schema will be visible in the CloudKit dashboard and
the representative records will be deleted.
This method returns YES if these operations succeed, or NO and the underlying error if they fail.
Note: This method also validates the managed object model in use for a store, so a validation error
may be returned if the model is not valid for use with CloudKit.
*/
open func initializeCloudKitSchema(options: NSPersistentCloudKitContainerSchemaInitializationOptions = []) throws