Push notification badge

你。 提交于 2019-12-02 18:26:32

问题


I am pushing several messages form my server to the iPhone. When I am pushing I'm setting the badge value as 1. As there are several independent tasks in the server there may be situational where server pushes messages to same phone but the badge will be 1 cos as those are independent tasks I cannot increment the badge and send. So I want to know whether this badge is incremented in the iPhone side or do we have to push the badge value appropriately?

Thank you


回答1:


The badge value will be whatever you set it to, it won't increment on the device automatically. Your server logic needs to keep track of the proper badge count and send it appropriately.

Services like Urban Airship offer solutions for auto-incrementing badge counts on their server, which may or may not assist you.

Also see this SO question.



来源:https://stackoverflow.com/questions/4112141/push-notification-badge

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!