I developed core data based app and implemented iCloud sync feature after it was introduced in iOS 13.
I enabled iCloud kit, used NSPersistentCloudKitContainer
instead of NSPersistentContainer
and added several lines of code to sync core data with iCloud.
Sync works fine. The problem is that when I uninstall app and reinstall app, it doesn't fetch iCloud data at first time. I have to restart app or open another screens to let Core Data to be synced with iCloud. Is there anyway I can check if core data is being synced with iCloud or wait until it finishes syncing?
Thanks.
NSPersistentCloudKitContainer.eventChangedNotification
, how to use it is described in this answer: link – Eloisaeloise