Is there any way to increment a badge by one every time a push notification is received and the app is closed and not in the background?
I am currently managing the badge count on the server side and including the updated badge count in the payload. However in the case where multiple notifications need to be sent (such as a chat room situation), this is tedious and expensive on the server. Instead of passing an array of deviceToken's to the apns server I will need to loop through each device with the badge number for that device.
I would prefer to increment the badge count locally on the device when the push notification is received in ALL CASES including when the app is closed and not in the background.