简体   繁体   中英

iphone push notification badge number increment

How to increment the badge number and how to know whether the user opens the notifications.so v could know whether to increment the badge no or to start from the beginning(as 1).

here

alertNotification.Payload.Badge = 1;

You cannot increment or decrement badge number using push-notifications. You can only set NEW value !

You can know current badge value only if your application is now running.

If you extremely want to add such feature you should store current user's badge value at your server and send appropriate value with your push-notification.

PS It's very strange that Apple didn't think about it when they were developing badge numbers and push-notifications. =(

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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