0

we implemented fcm webpush notification That are working fine on other browser except on ios safari

Notification.requestPermission not open consent prompt on safari & ios

Notification.requestPermission().then((permission) => {
      if (permission === 'granted') {
        getToken(messaging, {vapidKey: "BDdPw4DcKQqPO----------------"}).then((currentToken) => {
          if (currentToken) {
            this.sendTokenToServer(currentToken);
          }
        }).catch((err) => {
          console.log('An error occurred while retrieving token. ', err);
        });
      }
    });`
  • 1
    Currently iOS supports Web Push with [some limitations](https://blog.pushpad.xyz/2021/10/apple-is-working-on-web-push-notifications-for-safari/). As described in the article you need to add the app to home screen and wait for a user action. – collimarco Apr 20 '23 at 13:53

0 Answers0