wix / react-native-notifications

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

Exposes new event: remoteNotificationsRegistrationDenied #845

Closed artdevgame closed 2 years ago

artdevgame commented 2 years ago

On iOS, calling requestPermissions causes a permission dialog to appear.

image

Pressing OK in this dialog will eventually emit a registerRemoteNotificationsRegistered or registerRemoteNotificationsFailed event.

However, there's no event emitted if the user chooses "Don't Allow", so if the implementor is attempting to do something in their app depending on which action has been taken, they are unable to do so.

This work exposes a new event called: remoteNotificationsRegistrationDenied that is emitted when requestAuthorizationWithOptions has been executed without error but with granted set to 'NO'.

Related:

obabovic commented 2 years ago

Hey, nicely done. Is this going to be released anytime soon?

DanielEliraz commented 2 years ago

release is 4.3.0