Programmatically delete Remote Notifications from Notification Centre
apple-push-notifications, cocoa-touch, ios, ios10, objective-c
Solution
Finally...
This one works like charm!
[[UNUserNotificationCenter currentNotificationCenter] removeAllDeliveredNotifications];
Problem
How can we pragmatically remove any pending remote notifications sent for my app from notification centre. I want to clear them up on app launch. I have tried with `[[UIApplication sharedApplication] cancelAllLocalNotifications];` API but its not helping. PS: This question is specific to iOS 10 and old threads are not duplicates for this one.