react-native-push-notification / ios

React Native Push Notification API for iOS.
MIT License
741 stars 285 forks source link

cancelLocalNotifications deprecated? #217

Closed joebernard closed 3 years ago

joebernard commented 3 years ago

cancelLocalNotifications is marked as deprecated with a note to use removeAllPendingNotificationRequests instead.

However, removeAllPendingNotificationRequests cancels ALL scheduled notifications. It does not allow targeting of specific notifications to cancel. Is there an alternative to cancelLocalNotifications that will accept userInfo similar to cancelLocalNotifications?

Note that the docs do not show cancelLocalNotifications deprecated, it is just in the declaration.

Naturalclar commented 3 years ago

@joebernard Thanks for raising the issue! It seems that I've missed that part of the specification. I'll be adding another method that will allow specifying which notification to cancel in the next few days. Sorry about that!

Naturalclar commented 3 years ago

@joebernard removePendingNotificationRequests has been implemented in v1.8.0 :tada: should replace cancelLocalNotifications method