Hello, I'm stuck with clearing badge number. When I set applicationBadgeNumber = 0, badge disappears from the app icon. Then the app receives a new push notification (badge = +1) and instead of having badge that equals to 1, I get badge that was just incremented from the previous badge number. For example, if I have badge=5, then I set applicationBadgeNumber = 0 and send a push notification with +1, I get 6. In the framework I've found a method:

/** Sends current badge value to server. Called internally by SDK Runtime when UIApplication setApplicationBadgeNumber: is set. This function is used for "auto-incremeting" badges to work. This way Pushwoosh server can know what current badge value is set for the application.

@param badge Current badge value. */

  • (void)sendBadges:(NSInteger)badge;

And as I can see in the comment to the method, I don't have to do any other work apart from just setting application badge.

Thank you in advance.

asked 18 Oct '16, 15:51
ncherniavskaya's gravatar image



Please note that you should pass the same value as you have currently as a badge number.

For example, if you have 6 as your badge number currently, you should pass 6 and not 0, because it actually sends the current amount to the server so it will auto-increment properly.

In case you want to SET the badge to 0, please consider doing so by using a /createMessage request with the "ios_badges" parameter.

Kindly let me know if there are any further questions!

permanent link
answered 20 Oct '16, 06:46
Nikolai's gravatar image


edited 20 Oct '16, 06:49

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 18 Oct '16, 15:51

question was seen: 1,476 times

last updated: 20 Oct '16, 06:49