iPhone: how to remove badge after Push Notification?

iphone, objective-c, push, xcode

Solution

objC :

[UIApplication sharedApplication].applicationIconBadgeNumber = 0;

swift :

UIApplication.sharedApplication().applicationIconBadgeNumber = 0;

Problem

What is the code to remove the badge on my app's icon? When I receive push, I need to remove it when a button is clicked!

Original source

Related problems