Created
March 14, 2013 02:56
-
-
Save corybohon/5158471 to your computer and use it in GitHub Desktop.
Remove local and remote notifications in iOS apps. Simply put this in your App Delegate, and then call [self clearNotifications] in -didFinishLaunchingWithOptions, or another delegate method of your liking in your App Delegate. Personally, I like putting it in -- (void)applicationWillEnterForeground:(UIApplication *)application because that meth…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) clearNotifications | |
{ | |
[[UIApplication sharedApplication] cancelAllLocalNotifications]; | |
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:1]; | |
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment