I tried adding iCloud Sync to my SwiftUI app without any luck.
So I decided to try using the example app in XCode when I create a project and select Use Core Data and Host in CloudKit.
I created the project and enabled the iCloud capability, created a new container, added background modes capability with remote notifications, signed in to the same iCloud account on two simulators and it still won't work. I also tried on a simulator and on my physical device and it still won't work. Any activity I do on the app doesn't even show up in the logs in the CloudKit console.
What am I doing wrong?