I am having an issue with my CoreData to iCloud synchronization with NSPersistentCloudKitContainer
.
The synchronization works, but when i do a fresh install of the app there is an annoying delay of several seconds between app launch and the end of synchronization. I need to decide at launch whether to create new data entities or use the "old" data from iCloud.
I could live with the delay and wait for the sync to finish if there was a way to
a) determine at launch that there is data in iCloud to be synchronized and
b) get a notification when synchronization is finally done
Does anyone know of a solution to achieve this? Setting
NSPersistentStoreRemoteChangeNotificationPostOptionKey
does not help much, as it is fired several times during sync and does not give any status information.