当应用程序关闭时,Firebase IOS推送通知不起作用 [英] Firebase IOS push notification doesn't work when app is closed

查看:112
本文介绍了当应用程序关闭时,Firebase IOS推送通知不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当应用程序关闭时,Firebase IOS推送通知不起作用。我已经按照文档中的所有步骤进行了操作。

解决方案

这是一个快速修复,只需在您的通知旁边的有效载荷等,iOS通知将在应用程序在后台工作。



所以这将工作:

 to:TOKEN ID,
notification:{
body:test
} ,
priority:high
}


Firebase IOS push notification doest not work when app is closed. I have followed all the steps as in documentation

解决方案

It's a quick fix, simply add "priority": "high" in your payload next to "notification" etc. and the iOS Notification will work when the app is in the background.

So this will work:

"to":"TOKEN ID",
"notification" : {
  "body" : "test"
},
"priority": "high"
}

这篇关于当应用程序关闭时,Firebase IOS推送通知不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆