Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

CloudKit not storing or updating public data in real time.

My newly released App Snapshot-Chess-Move, #1592848671, is not creating a public database of chess moves as I expect. What steps do I need to do inorder for my App to be using a public database. It appears as if each of my iOS devices, iPhone, iPad and Mac mini each have a private database of chess moves. When I change my data on the iPad, I expect the new data to appear (with slight delays) on the Mac.. I do not know what to do next. Please help me. This was working in Development mode but not in Production when I submitted my App for release. UPDATE: The cloud data is copied locally to a @Quary variable and updated by using .insert, .delete and .save commands. So, I deleted and re-downloaded my apps on each device, iPad, iPhone, and Mac and obtained the same cloud data. So how do users get the most recent copy of the cloud. Do they need to delete their App and start over? Is there a .update command that can do this updating for me? Also, I pushed the App out of the background and restarted the App to obtain the updated cloud data.

UPDATE 2. I double checked and the Mac mini is not updating to the cloud. I deleted my App and re-downloaded it with an old database. So does Macs have separate clouds? I'll continue investigating....

Use CKContainer.publicCloudDatabase when running CloudKit operations. It sounds like you're using the private database. If this doesn't resolve your problem, include some relevant code or pseudocode in your post.

Accepted Answer

interferon, thanks for responding. Doing another google search for answers I learned that SwiftData and CloudKit only do private databases. So, I need to wait for the next best SwiftData update in order to have a public database. I can wait. So SwiftData and Cloudkit are not using public databases at this time.

CloudKit not storing or updating public data in real time.
 
 
Q