I am facing a problem with push notification application badge number value updation.
I am doing like:
-(void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo {
UIApplicationState state = [application applicationState];
if (state == UIApplicationStateActive) {
// do stuff when app is active
}else{
// do stuff when app is in background
[UIApplication sharedApplication].applicationIconBadgeNumber =
[UIApplication sharedApplication].applicationIconBadgeNumber+1;
/* to increment icon badge number */
}
}
But, the icon is showing the badge number as '1' always, and it is not incrementing when more notifications are there/ one notification came after another.
Any advice is appreciable...