Closed artdevgame closed 2 years ago
@DanielEliraz I don't normally work with Objective-C, so there's probably improvements that need to be made. Could you help me work through any please?
Recreated PR because GitHub had an issue whilst creating this one: https://github.com/wix/react-native-notifications/pull/845
On iOS, calling
requestPermissions
causes a permission dialog to appear.Pressing OK in this dialog will eventually emit a
registerRemoteNotificationsRegistered
orregisterRemoteNotificationsFailed
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 whenrequestAuthorizationWithOptions
has been executed without error but withgranted
set to 'NO'.Related: