user3400046
user3400046

Reputation: 61

Badge number is not increasing on application icon when user receive more than 1 push notifications

Badge number is not increasing on application icon when user receive more than 1 push notifications when the application is in background. I am showing the badge number that I am getting from the server. Can we handle this from mobile end in iOS.

Upvotes: 0

Views: 516

Answers (1)

Janak Nirmal
Janak Nirmal

Reputation: 22726

As per documented here you can send badge number from push notification. What you need to do is track actual badge to be set on webserver and than set it in to dictionary as below. enter image description here

So if you send dictionary like below in push notification you will have badge set to 9 automatically you don't need to do anything programatically.

{
    "aps" : {
        "alert" : "You got your emails.",
        "badge" : 9,
        "sound" : "bingbong.aiff"
    },
}

Above can be done through php or .net depending on your server.

Upvotes: 2

Related Questions