Reputation: 3346
I want to simulate push notification without using apple's push notification server, so I want to know can I show badge also if yes which API or Objective-C code I have use to show badge?
Upvotes: 1
Views: 1454
Reputation: 3346
We can use [[UIApplication sharedApplication] setApplicationIconBadgeNumber:<n>]
to show the badge with out APNS.
If we want to reset the previous badge while application is restarted ,we can use this
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
Upvotes: 1
Reputation: 13675
Yes. Use [[UIApplication sharedApplication] setApplicationIconBadgeNumber:<n>]
. See the documentation.
Upvotes: 2