Sync SwiftData via CloudKit on App Start

I have an app that uses SwiftData with CloudKit to synchronize data across a users devices. I'm able to replicate data created on one device on another and when removing data, it is also removed on the other device. So, I know that SwiftData and CloudKit are configured correctly.

What I'd like to do though, is to ensure that if a user installs the app on an additional device, that the data is synchronized upon app start.

When testing my app on a third device, via TestFlight, there was no data in the app upon launch even though all three devices are using the same Apple account (e.g. Apple ID).

What is the best way to achieve this?

I think, The default configuration of SwiftData and CloudKit meets your needs

I think this maybe caused by the other two devices using the development container and the third device, which never had a development build, using the production container. All three are using an Apple ID from the internal testing group and so I would have thought all three should be on the same container.

Sync SwiftData via CloudKit on App Start
 
 
Q