ios - Flutter 应用程序的 FCM 通知未显示在 iOS 系统托盘中

标签 ios firebase flutter firebase-cloud-messaging

我有一个 Flutter 应用程序,我在其中使用 Firebase Cloud Messaging 进行通知。
我正在通过 firebase 控制台发送测试通知。
通知在 android 上按预期运行。
在 ios 上,当应用程序处于前台时,通知会按预期到达。当应用在后台最小化时,通知不会显示在系统托盘中。即使我通过控制台发送时在 firebase 通知中设置了角标(Badge),也没有显示角标(Badge)。
从本质上讲,在再次打开应用程序之前,根本没有通知已经到达的迹象。
我已按照 this page 上的说明进行操作并确认我遵循了 ios 集成步骤到 T。
我正在模拟器上测试。

最佳答案

根据找到的文档on Firebase website关于苹果整合:

For iOS; you must have a physical iOS device to receive messages. Firebase Cloud Messaging integrates with the Apple Push Notification service (APNs), however APNs only works with real devices.

关于ios - Flutter 应用程序的 FCM 通知未显示在 iOS 系统托盘中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66021140/

相关文章:

Flutter:如何使用flutter_ffmpeg为视频添加水印和文字等叠加层?

ios - 我的应用程序一直提供 UILocalNotifications,即使代码中没有

ios - 在一个 block 中保留循环

firebase - 在发送云消息时我是否需要关注 firebase 刷新 token ?

java - Firebase 安卓。如果我多次添加同一个监听器怎么办?

flutter - 有没有办法将仅在运行时已知的参数传递给 getit 依赖注入(inject)创建的对象?

ios - SVProgressHUD 与 CocoaPods 不同版本

ios - NavigationItem 按钮和 Edit mode 按钮分层次显示

android - WebView 的 Firebase 性能监控

flutter - Flutter 中有哪些不同的构建器小部件(Futurebuilder、Streambuilder、Layout builder、Listview Builder)?