With SwiftData and iCloud, should edited records be automatically shown/refreshed on each devices screen, just like added and deleted records?
I have a small app using SwiftData that allows create, add, update, and delete of items, with a list showing all the items.
I have enabled iCloud and have confirmed that when I ADD a new record on device-1 that it auto-magically appears on device-2 without touching anything. The new entry shows up at the bottom of the list on device-2 within a couple of seconds. I was surprised at just how easy Apple have made it to handle that.
However, when I EDIT an existing item on device-1, the amendment is not automatically refreshing on device-2. If I shut down the app on device-2 and start it again, then the edited records are correctly shown. Same thing vice-versa. Edits on device-2 are not shown on device-1 either, until I shut down the app and start it again.
Deleted records are synchronised and automatically refreshed on the screens correctly between the devices. It is only edits that are not automatically being shown.
I have also tried using the developer console. If I add or delete a record on the console, they are automatically shown on both devices, however if I edit a record on the console, neither device-1 or device-2 show the edited record until I close down the app and start it again on each device.
Is there something obvious that I have overlooked here?
Should edited records be automatically shown on each device, just like added and deleted records?