I am trying to port my application over to CloudKit. My app worked fine before, but then I made scheme of changes and am trying to deploy to a new container. For some reason, the database is not being created after I create the container through Xcode.
I think I have configured the app correctly and a container was created, but no records were deployed. My app current stores data locally on individual devices just fine but they don't sync with each other. That's why I would like to use CloudKit.
See screenshot from Xcode of where I have configured the container. I also have background notifications enabled. Also see screenshot from console where the container has been created, but no records have been.
Any suggestions would be greatly appreciated.
Thank you
Is there a reason when I run the app, it doesn't build a schema automatically in the new container?
In the development environment, CloudKit automatically creates the schema only when you create the data, and it has always been the case.
When using Core Data + CloudKit, you typically need to call initializeCloudKitSchema(options:)
to create the CloudKit schema that matches their Core Data model, or keep it up to date every time their model changes, as described in the mentioned sample code Readme.
Best,
——
Ziqiao Chen
Worldwide Developer Relations.