Kirankumar Dafda Kirankumar Dafda - 1 month ago 21
iOS Question

Cordova Push notifitication badge not displaying on app icon iOS

I am using cordova push plugin where I am getting notification and all data I needed, but also I want to set badge as per the unread notification or the number i am getting into count of push notification but I am not sure why I am not getting this count as a badge into app icon of iOS device

Here is the json format I am getting into push notification success function

{
"count":"1",
"sound":"default",
"additionalData":{
"foreground":true,
"product_id":"19",
"user_id":"2",
"coldstart":false,
"notificationstatus":"like"
},
"message":"Username likes your product"
}


Sound and message both were working perfect but not count.

Any suggestion ?

Answer

I noticed that, there is a string value of count in the response, and it was the mistake.

Count value must be an integer.

Hope this will help others too.