Bug Check: CloudKit MacCatalyst didReceiveRemoteNotification

ぐ巨炮叔叔 提交于 2020-02-04 22:56:58

问题


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
  • UIApplicationDelegate method didRegisterForRemoteNotificationsWithDeviceToken fires and UIApplication.isRegisteredForRemoteNotifications returns true when calling UIApplication.registerForRemoteNotifications
  • Setting the CKSubscription.NotificationInfo to invoke an alert notification which displays properly in MacOS
  • UNUserNotificationCenterDelegate method, willPresent, when an alert notification is invoked and the app is in the foreground
  • didReceiveRemoteNotification on 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!