I've been able to set an application badge number to my iPhone app and updating it once the user interacts with my app:
[[UIApplication sharedApplication ] setApplicationIconBadgeNumber:currNrOfNotif];
What I wont though, is for this process to occur while in background mode, ie from within applicationDidEnterBackground
or similar. I would like this process to be scheduled to run daily, every night at 00:00 00:00 and take the current number in setApplicationIconBadgeNumber and decrement it by -1. No need for push notifications (or any server kind) in other words as the only thing that will happen is a change of the badge number value.
First of all, how do I schedule an activity to occur while app's in background mode, without using remote server push notifications?
Secondly, how do I get or fetch the current application notification badge value and decrement it by one?
In this post, some people argue it simply can't be done even with local notifications and that server side push's required. One person, however, states it can be done by scheduling it by midnight. Who's right, and can someone please propose a solution to this?