Is there a way to programmatically remove/dismiss UILocalNotification
from Notification Tray.
I am able to cancel the notification which removes the notificatio
If the Application is not running, you will be receiving the Local Notification object in the
-applicationDidFinishLaunchingWithOptions:
like:
UILocalNotification *localNotif = [launchOptions objectForKey: UIApplicationLaunchOptionsLocalNotificationKey];
or else you can get it in
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
Now you can remove it from the Notification Center using
[[UIApplication sharedApplication] cancelLocalNotification:notificationToCancel];