My app uses SwiftData and CloudKit to store and synchronize data. This works nice. in some scenarios, I need to listen to NSPersistentStoreRemoteChange event to deduplicate data.
In SwiftData, how do I get the persistentStoreCoordinator of the corresponding SwiftData ModelContainer? Or are there other APIs to achieve the same purpose? There is no relevant content in the developer documentation.
In addition, in wwdc 24, there is a new API to track history (https://developer.apple.com/cn/videos/play/wwdc2024/10075/). But there is no mention of how to listen to remote data change events either.