0
votes

i try to update badge icon, every time when when the app (in background)receive a push notification.

i used that in "didReceiveRemoteNotification" and "didFinishLaunchingWithOptions"

[UIApplication sharedApplication].applicationIconBadgeNumber++;

If the app is in foreground and receive few push notifications, when the app come back in backgorund the icon's badge is updated with the number of push notifications received.

But if the app is in background the icon's badge is allways 1 like in payload even the app receive many notifications.

Do you have some ideas? Thanks in advance

1

1 Answers

0
votes

The push notifications that are sent to your device should have the badge numeric value which will be et automatically when push is received.

The server should somehow handle the number of your unread notifications and it sends you the correct display number in this field.