Back

Insights

Jul 12, 2023

Send web push notifications in iOS Safari - Is it possible yet?

Anand S

Is it possible to send Web push in iOS Safari. This is one of the most frequently asked questions by developers. I began to hear this question since I started my first product that dealt with web push notifications in 2017. Even now, it is one of the most searched term by both marketers and developers. Along with email, in-app, sms , mobile app push notifications, web push is an important channel to communicate with users. So the real question is - Is it possible to send web push notifications in Safari iOS? Let’s figure out.

Web Push Notifications in iOS Safari. Is it possible yet?

The answer is, unfortunately, No! But don’t lose your hope yet. This No is different from the previous “No”s you’ve been hearing for the last few years. Why? Read below. What is the current state of iOS web push notifications? Well, finally Apple has officially announced that support for web push notifications in Safari will be available in iOS 16. Yes, iOS 16 is already live but it is not currently enabled. This functionality will be enabled later in 2023 with an update to iOS 16. So, we’re only a few months away from sending web push notifications to our iOS users! If you check the “Experimental Features” section on iOS Safari settings, you can already see Push API listed there. But as of now, it is not functional.

// Use serviceWorker.ready to ensure that you can subscribe for push
navigator.serviceWorker.ready.then(
  (serviceWorkerRegistration) => {
    const options = {
      userVisibleOnly: true,
      applicationServerKey,
    };
    serviceWorkerRegistration.pushManager.subscribe(options).then(
      (pushSubscription) => {
        console.log(pushSubscription.endpoint);
      }, (error) => {
       
        console.error(error);
      }
    );
  });

Anand S

Share this post