简体   繁体   English

推送通知徽章

[英]Push notification badge

I am pushing several messages form my server to the iPhone. 我将服务器上的几条消息推送到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. 推送时,我将徽章值设置为1。由于服务器中有多个独立的任务,可能会出现服务器将消息推送到同一部手机但徽章将为1 cos的情况,因为这些是独立的任务,因此我无法递增徽章和发送。 So I want to know whether this badge is incremented in the iPhone side or do we have to push the badge value appropriately? 所以我想知道这个标志是否在iPhone端增加了,还是我们必须适当地推动标志值?

Thank you 谢谢

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. 诸如Urban Airship之类的服务提供了用于在其服务器上自动增加徽章计数的解决方案,这可能会或可能不会为您提供帮助。

Also see this SO question . 另见这个问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM