Reputation: 7762
In my app i want to send for users 2 types of notification.
From stuff(admin send it manually)
When statistic will update.
I want to remove badge with stuff notifications when user launch application, and statistic notification badge when user enter in some screen after login. But i only found method:
application.applicationIconBadgeNumber = 0
So how it is possible to detect, what i need to remove...
Upvotes: 0
Views: 499
Reputation: 950
In some case we don't want to set badge icon to ZERO at all. There is method to get app-icon badge numbers.
[UIApplication sharedApplication].applicationIconBadgeNumber = [UIApplication sharedApplication].applicationIconBadgeNumber - 1;
Once you receive push-alert, you will have some KEY whether its STUFF or STATIC update.
Once user click on push notification from notification tray or on alert. Check for that KEY(Stuff/Static) & using above line change badge number reduce badge number.
I hope this will give you idea.
Upvotes: 1