wix / react-native-notifications

React Native Notifications
MIT License
3.23k stars 763 forks source link

How to undo `Notifications.registerRemoteNotifications()` ? #1030

Open zabojad opened 7 months ago

zabojad commented 7 months ago

I do not see any API to undo Notifications.registerRemoteNotifications(). How to do that?

zabojad commented 7 months ago

Once we've registered, seems that await Notifications.isRegisteredForRemoteNotifications(); will always return true then...

zabojad commented 7 months ago

I'm really surprised no one else has needed this at some point 🤔...

Sayah-Sel commented 5 months ago

I also need that. I though Notifications.ios.abandonPermissions(); would to the job for iOS, but it does not seem too.

It is quite annoying, when developping an app, because one would certainly test the registration procedure before having set the entire flow to send the token to the backend and deal with it.

In my case I just wanted to see what this token looked like, and especially its type :/

I am trying actually to clean everything and build again the project, I hope it will unregister 😅