微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

PHP-Onesignal徽章计数增量不起作用

在Onesignal API中,我添加了isIos => true,ios_badgeType =>增加,ios_badgeCount => 1,content_available =>在字段数组中为true.
但是徽章计数始终保持为1,并且不会随着多条消息的增加增加.

这是我的有效负载详细信息:$fields = array(‘app_id’=>“ xxxxxx”,’included_segments’=> array(‘All’),’data’=> array(“ notification_type” =>“ “),’contents’=> $content,’subtitle’=>> $subtitle,’headings’=> $heading,’isIos’=> true,’ios_badgeType’=>”增加“,’ios_badgeCount ‘=> 1,’content_available’=> true);

解决方法:

您必须添加Notification Extension才能自动更新徽章.请遵循link to setup.

另外,需要创建应用程序组并将两个捆绑软件ID都分配给该特定组.请参阅-

In order for your application to be able to let push notifications
increment/decrement the badge count, you need to set up an App Group
for your application.

See here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐