Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposes new event: remoteNotificationsRegistrationDenied #845

Merged
merged 3 commits into from
Mar 24, 2022

Conversation

artdevgame
Copy link
Contributor

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:

Copy link
Collaborator

@DanielEliraz DanielEliraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, thanks a lot🥇 that looks great!
I'll merge it and after that the I'll add commits for the payload types instead of unknown and to use RNNotificationEventHandler

@DanielEliraz DanielEliraz merged commit d727df5 into wix:master Mar 24, 2022
@artdevgame artdevgame deleted the dont-allow-event branch March 24, 2022 12:12
@obabovic
Copy link

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

@DanielEliraz
Copy link
Collaborator

release is 4.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants