The badge must be a integer.
[UIApplication sharedApplication].applicationIconBadgeNumber = 2;
To remove the badge just set it as a 0
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
[UIApplication sharedApplication].applicationIconBadgeNumber = 2;
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;