I'm using Urban Airship to send push notifications to my app
eg:
{"aps": {"badge": 2, "alert": "Part 2 of the August Issue is ready to download!", "sound": "default"}, "device_tokens": ["X"]}
The alert will display perfectly, however the app icon is never badged regardless of what I set "badge":# to...
Is my payload incorrect or is there extra code I'm supposed to add to my app to handle badges as well as alerts? Thanks!
EDIT: I'm registering for push notifications like this:
// Register for notifications
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeNewsstandContentAvailability | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert)];
I was running with a similar problem. After a few minutes of checking around. I notice that there was a problem with my server side code. I found out that badge value has to be implicitly set as an integer to get the desired result. Hope that helps anyone reading this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With