I would like to use Fireabase messaging service to notify Web Application with PWA in Safari(iPhone). However, when I try to get the FCM Token during screen initialization, I get the following error.

Notification prompting can only be done from a user gesture.

getToken source that is Throwing error

The user cannot set the user to allow notifications because the dialog to set notifications is not displayed.

  • Question 1: If I want to display the Dialog for notification permission again after starting with PWA, how can I configure it?
  • Question 2: If I do not place the button to allow notification permission on the screen, is there any way to avoid the "Notification prompting can only be done from a user gesture." error?

Thanks

Related questions 0 How to send FCM push notification message from app server to mobile clients? 25 How to know if the push notification permission alert has already been shown 6 Ionic 3's PWA & Firebase Cloud Messaging registration

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.