How to add Badge number (number on icon in home screen) in iphone development

Adding Badge number over the icon useful to you as  a developer, sometimes you may need to alert users of your app when they are not launching your app(Alerting users ).

set this single line code in ApplicationDidFinishLaunching
[UIApplication sharedApplication] setApplicationIconBadgeNumber:1] // it sets 1 over the icon in your app at home screen

to remove this set this line with number 0:

[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]// once the app has been launched or you got satisfied that your msg has been reached users



Leave a Reply

Your email address will not be published. Required fields are marked *