【问题标题】:Push notification not coming in IOS device when app in background or kill. Navigate to next screen also not working In IOS device in Flutter?当应用程序在后台或终止时,iOS 设备不会推送通知。导航到下一个屏幕在 Flutter 的 IOS 设备中也不起作用?
【发布时间】:2021-02-17 01:49:18
【问题描述】:

当应用程序在后台或销毁时,iOS 设备不会推送通知。 导航到另一个屏幕在 IOS 设备中也不起作用。 Android设备中的所有东西都正常工作 这是我的代码::-Main.dart https://gist.github.com/phenomenal25/87f5e9a8564b834129033c1e6e513a17

【问题讨论】:

    标签: android ios flutter push-notification background


    【解决方案1】:

    大家好,我找到了答案

    只有当您的应用程序在后台或终止系统托盘时,推送通知才会出现(在 IOS 设备中),当您在此传递自定义数据时不会发出通知。消息由 FCM 存储,并在应用返回前台时通过 onMessage 传递给应用。

    【讨论】:

      【解决方案2】:

      查看您的 info.plist,是否添加了以下代码。

      <key>FirebaseAppDelegateProxyEnabled</key>
       <false/>
      

      注意:在真机中测试,而不是在模拟器中。

      【讨论】:

      • 已经在 info.plist 中添加了上面的行,并在真实设备中进行测试
      猜你喜欢
      • 2023-03-26
      • 2016-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-10
      • 1970-01-01
      相关资源
      最近更新 更多