It could be a possible duplicate link of.
Remove single remote notification from Notification Center
According to this post we can't delete single notification from notification center(NC). For canceling notification we have below methods.
1).cancelAllLocalNotifications : it remove all notification. 2).cancelLocalNotification : it require notification as input.
I tried both methods, using first one it remove all notification from NC and the second one not seems work. Here is the second snippet which I am applying on didRecivedRemoteNoitification method.
UIApplication *app = [UIApplication sharedApplication];
NSArray *eventArray = [app scheduledLocalNotifications];
for (int i=0; i<[eventArray count]; i++)
{
UILocalNotification* oneEvent = [eventArray objectAtIndex:i];
NSDictionary *userInfoCurrent = oneEvent.userInfo;
NSLog(@"userInfoCurrent : %@", userInfoCurrent);
int notiid=[[userInfoCurrent valueForKey:@"notificationID"] intValue];
if (notiid ==deletenotiid)
{
//Cancelling local notification
[app cancelLocalNotification:oneEvent];
break;
}
}
So my question is I am seeing couple of application that remove the tapped one notification from NC for example skype
Is there something which I am missing to apply.
Thanks for your valuable time.