react-native-push-notification / ios

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

Is updating an existing local notification with same id allowed? #304

Open silencer07 opened 3 years ago

silencer07 commented 3 years ago

Title says it all. I am actually using react-native-push-notification library that depends on this library for iOS implementation. In android it is really possible to update notification using just ID, however in iOS, it seems that the first notification is not updated even if you provided the same ID.

Edit: Checking this line of code, maybe a rudimentary approach is remove pending notification first with the same ID.

If the rudimentary approach is not acceptable(which I think for most cases yes because you will see the notification gets removed and added back, which can be annoying to user). is it possible to use apns-collapse-id in local notifications(I suppose no but maybe someone can vouch if possible), so that the actual notification gets updated instead of seeing a removal and addition of notification