Is it possible to increment the badge value on receiving the notification. OR Should I send the count as payload?
If i am sending the badge value as "1" every time, how could i increment the badge-value in the icon of the app if the app is not open.
i have used this code but doesn't work.
-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
[UIApplication sharedApplication].applicationIconBadgeNumber = [UIApplication sharedApplication].applicationIconBadgeNumber + 1;
}
See Question&Answers more detail:os