Push-Notification Badge auto increment

Nope, you'll have to track this on the server side. If you don't include any value for badge, it will get removed completely.

Of course though this is only if the user receives the notification and the app isn't running/they choose not to launch it. If the user launches the app or already had it running you can do whatever you want in regards to incrementing.

UPDATE March 2014: See comments for a possible update. I haven't done pushes in several years so haven't been able to verify this myself.


It's sort of possible but there's a trade-off.

You can always send up the unread total as an add-on JSON value as part of the push payload (push ignores keys it doesn't explicitly understand). Once the user opens the app, read the value and adjust the badge programmatically yourself via UIApplication's applicationIconBadgeNumber property.

The problem with doing it that way is that push adjusts the badge value even if the user doesn't open the app (i.e. when they get the notice and the user hits 'Cancel' instead of 'View'). In those cases your badge won't change, but as soon as they run the app (if they hit 'View') then your app can set it right.