CloudKit Notifications With Mac Catalyst

Sync between iOS and Mac Catalyst is intermitent. The fundamental issue is slow and inconsistent remote notifications being sent to and received by the Mac Catalyst app.


When making changes in the Mac Catalyst app, those changes are successfully pushed to the iCloud private database and the iOS or iPadOS app successfully receives the remote notification indicating the change. In short, the MacOS -> iOS direction is seemless.


When making changes in the other direction, we run into problems. A change in the iOS app successfully gets pushed up to the iCloud private database, and other iOS or iPadOS devices successfully receive the remote notification. However, Mac Catalyst apps most commonly will not receive the remote notification at all, or – occassionally – will receive it several minutes after the change took place. Rarely will the Mac Catalyst app receive the notification in a timeframe consistent with the performance of iOS apps (within 2-4 seconds).


Why are Mac Catalyst apps having so much trouble receiving these CloudKit-triggered remote notifications?


(Note that these issues are present in both development and production environments.)

Replies

Additional info:

CloudKit Dashboard logs suggest that "zone changes" operations are generally not even being processed for the Mac devices, or they're processed very late.


Ie, the issue lies not with the Mac receiving notifications, but instead with CloudKit sending the notifications in the first place.

Every time the Mac app receives the remote notification indicating the iCloud changes, the CloudKit dashboard logs show the "zone changes" operation is taking place. However, when a change on a device does not get reflected in the Mac app, indeed there is no "zone changes" operation for the Mac in the CloudKit dashboard logs.

I have exactly the same issue! Did you find any solution?

No solution yet. I did initiate a TSI, and Apple's tech team asked me to push it into Feedback Assistant.


Please do also file the bug using Feedback Assistant, and feel free to reference mine: FB7442991.

Thank you for posting. I have the same problem.

We are facing the same issue, Did you get any solution?

I don't have anything else to add other that stating that I'm also seeing the same issue.

I am also just joining in here to say I am also having the same issue. Is this something we just have to 'deal with'... what would be the workaround?

It sounds like the Catalyst side is slow to send out change notifications. Is this the case?


You might want to try calling CloudKit libraries from an AppKit-linked bundle. That is have a non-Catalyst framework bundle (that doesn't link to UIKit) that exclusively talk to CloudKit. In turn the rest of the Mac/Catalyst app uses this bundle for anything Cloud-Kit related. Read this article for the details.

I am seeing very similar results but without catalyst. I have similar mac and iOS apps - created separately and not using Catalyst. If I make changes on the iPad, they appear almost immediately on the iPhone but take several minutes to appear on the mac. Changes made on the mac appear on the iOS devices in seconds.

Did you ever make any progress with this?

I have the same problem, I've created a macCatalyst app. Notifications between iPhone and iPad are working as expected. iCloud logs shows up my iPhone and iPad platforms. But I don't receive notification in my macCatalyst app (macOS).

I have the same problem

I have the same problem. CloudKit seems to sync very delayed / sometimes doesn't sync at all to the Mac app.
Just joining to stay in the loop ... same issue here.
Same issue here and wish to find some workarounds soon
For anyone also experiencing this problem while developing your app, I decided to publish the app anyways and found out that in the App Store version, on Mac the catalyst app actually could get the notification almost immediately. So it seems to be a debug environment bug for CloudKit.
  • Thank you so much for this insight :-)

Add a Comment