I have seen a few todo apps that update their app badges at midnight, always showing the correct number of due tasks. They do this without the use of Push Notifications - so my question is: how do they do this? Do they use local notifications - if so, do these get called when the device is turned off? I'm a little confused and would appreciate some input.
By using a 3D Touch or Haptic Touch gesture on the app icon in question via the Home Screen, you will find a new option in the ensuing menu entitled “Clear Notifications,” as shown above. Upon tapping on the new menu option, the notification badge promptly disappears from the app's icon.
Go to Settings and open Notifications. Scroll down and tap on Messages. To disable notifications altogether, toggle off Allow Notifications. To remove badges, turn off the toggle next to Badges.
The iOS badge count displays the number of unread notifications within your application, taking the form of a red circle in the upper-right hand corner of the app icon. In recent years, badging has come to be an effective means for re-engaging app users.
Try this
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:1];
To do this through local notifications you have to set the value in applicationIconBadgeNumber
UILocalNotification *localNotification = [[UILocalNotification alloc] init]; localNotification.applicationIconBadgeNumber = 1;// set here the value of badge
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