Skip to content

Commit 4afc891

Browse files
committed
Update iPhone/LocalNotification/plugin/LocalNotification.m
To clear all notifications, just alter cancelAllNotifications fron LocalNotifications.m file adding:     [[UIApplication sharedApplication] setApplicationIconBadgeNumber: 1];     [[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0]; before [[UIApplication sharedApplication] cancelAllLocalNotifications]; I hope, that solution can help.
1 parent 4ec1bf8 commit 4afc891

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

iPhone/LocalNotification/plugin/LocalNotification.m

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ - (void)cancelNotification:(NSMutableArray*)arguments withDict:(NSMutableDiction
6565

6666
- (void)cancelAllNotifications:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options {
6767
NSLog(@"All Notifications cancelled");
68+
[[UIApplication sharedApplication] setApplicationIconBadgeNumber: 1];
69+
[[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0];
6870
[[UIApplication sharedApplication] cancelAllLocalNotifications];
6971
}
7072

0 commit comments

Comments
 (0)