在 iOS 模拟器中从 firebase 推送通知

Push notifications from firebase in iOS simulator

我有一个使用 cordova-plugin-firebasex 推送通知的应用程序。但是当应用程序处于后台时,它们不会出现在通知中心。我在 XCode.

中使用 iOS 模拟器

我可以在应用程序处于后台时在模拟器中测试 Firebase 通知吗?或者我需要真正的设备?

模拟器不支持推送通知。您可以在您的控制台输出中看到来自 Firebase SDK 的输出文本 喜欢

6.27.0 - [Firebase/Messaging][I-FCM012002] Error in application:didFailToRegisterForRemoteNotificationsWithError: remote notifications are not supported in the simulator