问题
I am using MacCatalyst to port an iOS/iPadOS app to MacOS. The app uses CloudKit and functions in all ways except one: the UIApplicationDelegate method, didReceiveRemoteNotification, is not called on the MacOS version when a CloudKit update is submitted from another device
Things that do work in the app:
- Submitting
CKDatabaseOperations including updates and subscriptions to CloudKit - Manually retrieving database updates from CloudKit
UIApplicationDelegatemethoddidRegisterForRemoteNotificationsWithDeviceTokenfires andUIApplication.isRegisteredForRemoteNotificationsreturns true when callingUIApplication.registerForRemoteNotifications- Setting the
CKSubscription.NotificationInfoto invoke an alert notification which displays properly in MacOS UNUserNotificationCenterDelegatemethod,willPresent, when an alert notification is invoked and the app is in the foregrounddidReceiveRemoteNotificationon iOS and iPad (physical devices)
Has anyone had UIApplicationDelegate method, didReceiveRemoteNotification, called when using MacCatalyst?
Update:
The app did eventually fire the didReceiveRemoteNotification method 30 minutes after an update was sent, but on other updates, the method is not fired even after hours. Any ideas?
来源:https://stackoverflow.com/questions/59778113/bug-check-cloudkit-maccatalyst-didreceiveremotenotification