Okay, so I created a new Xcode project using SwiftData, and ticked the box for iCloud integration. I added a container on the web dashboard. Then I added “ = Date()” to the definition of Item.timestamp so that it has a default value. I added the container to my Xcode project..
Then I added this “let config” and “let container” and changed the “.modelContainer” like this:
This will successfully add stuff to core data, which also appears in iCloud dashboard.
BUT, if I delete the app and re-launch, I don’t see the existing iCloud data until the SECOND launch, even though the Xcode runtime log shows it fetched it.
Do I need to do some magic to get it to refresh? Is the CloudKit subscription managed by SwiftData or do I need to do something for that?
thanks!