Unable to get CloudKit sync Notifications on Mac Catalyst Build -application:didFailToRegisterForRemoteNotificationsWithError: is being called

Working on a Mac Catalyst version of one of my apps. I noticed making changes on my iPhone (debug environment) aren't being pushed to my Mac (also in debug environment). Then when I quit and relaunch the app and manually force an iCloud sync at launch I get all the changes.

At app launch I see the following method is being called on my AppDelegate after I attempt to register remote notifications:

-application:didFailToRegisterForRemoteNotificationsWithError:

with the error:

Notifications are not allowed for this application" UserInfo={NSLocalizedDescription=Notifications are not allowed for this application}.

Anyone experience this and have a solution? Under "Signing and Capabilities" I see an entry for Push Notifications for iOS and macOS.

So I deleted the "Push Notifications" entry in "Signing and Capabilities" then added it back. Remote notifications are working again. 🤷‍♂️

Accepted Answer

So I deleted the "Push Notifications" entry in "Signing and Capabilities" then added it back. Remote notifications are working again. 🤷‍♂️

Unable to get CloudKit sync Notifications on Mac Catalyst Build -application:didFailToRegisterForRemoteNotificationsWithError: is being called
 
 
Q