To add a badge that displays on top of your application icon using the iPhone SDK add the following line in your code

The badge must be a integer.

[UIApplication sharedApplication].applicationIconBadgeNumber = 2;


To remove the badge just set it as a 0

[UIApplication sharedApplication].applicationIconBadgeNumber = 0;