IOS应用程序中未接收到Firebase推送通知徽章计数



我正在从nodejs服务器发送带有firebase的推送通知。

消息有效载荷是这样的。

const notificationObjNew: any = {
notification: {
body: "demo body",
title: "demo title",
badge : "100",
},
topic: notificationTopic
};

在IOS应用程序中,我收到了这个作为-

{body:demo body,e:1,title:demo title}

这里没有徽章财产。

IOS在aps密钥下接收徽章计数。您可能正在共享aps下的警报本身的JSON。

正常有效载荷

"aps" : {
"alert" : {
"title" : "Game Request",
"subtitle" : "Five Card Draw",
"body" : "Bob wants to play poker",
}
}

badge

"aps" : {
"alert" : {
"title" : "Game Request",
"subtitle" : "Five Card Draw",
"body" : "Bob wants to play poker",
},
"badge":9
}

最新更新