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.
Finally...
This one works like charm!
[[UNUserNotificationCenter currentNotificationCenter] removeAllDeliveredNotifications];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With