推送通知徽章
我正在将几条消息从我的服务器推送到 iPhone。当我推送时,我将徽章值设置为 1。由于服务器中有多个独立任务,因此可能会出现服务器将消息推送到同一部手机的情况,但徽章将为 1,因为这些是独立任务,我无法增加徽章并发送。所以我想知道这个徽章在iPhone端是递增的还是我们必须适当地推动徽章值?
谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
徽章值将是您设置的任何值,它不会在设备上自动递增。您的服务器逻辑需要跟踪正确的徽章计数并适当地发送它。
Urban Airship 等服务提供了在其服务器上自动增加徽章计数的解决方案,这可能会或可能不会帮助您。
另请参阅这个问题。
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.