NSPersistentCloudKitContainer not syncing data on macOS

Hello, I am using

NSPersistentCloudKitContainer
to share data between iOS and macOS app.


I have set up the project according to the official tutorials. And when I made changes from the macOS app, the lastest data will automatically display on my iOS app. But in the other direction when I made changes on iOS, macOS app will not get the lastest version of the data.


I have verified on Cloud Dashboard that the changes made on iOS have been uploaded onto CloudKit server. Just the macOS app and the cloudd process won't create tasks to pull these changes (observed from console.app). And if I quit the macOS app and restart it, lastest data will be pulled.


So the problem is that macOS using

NSPersistentCloudKitContainer
will not get synced data in the runtime.


One potential reason is that the official tutorial has mentioned to set the background Remote Notification. I've done this for the iOS app. But for the macOS app, there are no background mode options so I skipped this step.


Any ideas to get the synced data on macOS in time? Thanks very much!



Just to be sure, you did set the "Push Notifications" capability in your macOS app?

Thanks for replying. Yes, I enabled it.

You can use the feedback assistant to file bugs against NSPersistentCloudKitContainer. Include the following:
  1. A sysdiagnose from all of the participating devices

  2. The persistent store files from all of the participating devices

  3. If your dataset is large, a detailed accounting of the affected records and the mutations made to them from each device (as well as you recall, history tracking is the truth)

Did you finally solve the issue?

NSPersistentCloudKitContainer not syncing data on macOS
 
 
Q