Safari Web Push Setup

How to add Safari support to your Web Push setup.

When you setup Webpush with our Quick Start Guide, you will also be setup with Safari, by default. This page will assist you if you want to add your own .P12 certificate.

Previously we required Web Push on Chrome and Firefox to be setup first! If you have set up Chrome and Firefox, you will be good to go with Safari!

How to add your own .P12 Certificate - Optional

This is optional. If you do not provide a .p12 certificate, we will generate one for you automatically.

  1. Go to Settings and click All Browsers to Configure the platform.

  2. Go to the bottom of the page, where you can find 'Safari Certificate'. Toggle this to be ON.

  3. Select your .P12 Certificate from your local computer location.

  4. Add in the corresponding private key password for your certificate.

1171

Image showing safari certificate entry

Adding a Script for Safari into your Website

If you are using Typical Setup you are done, press "Save" and you should be able to subscribe to the site on Safari if you have macOS.

If you are using Custom Code Setup, then copy the Safari Web ID like this: web.onesignal.auto.3c5e9739-5d2f-4f69-94b2-78aed3043174

Then in your site's OneSignal Init code, add the safari web id as a string this:

safari_web_id: "YOUR_SAFARI_WEB_ID",

Full code example:

<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async=""></script>
<script>
  window.OneSignal = window.OneSignal || [];
  OneSignal.push(function() {
    OneSignal.init({
      appId: "8e04addd-be31-43dc-8c7a-0618eb781972",
      safari_web_id: "web.onesignal.auto.3c5e9739-5d2f-4f69-94b2-78aed3043174",
      notifyButton: {
        enable: true,
      },
    });
  });
</script>

🚧

Safari Icon and Site Name

Due to Safari's custom web push implementation, your site name and icon image are treated as static resources downloaded and stored locally on the user's computer. New site names and new images are not updated or downloaded.

Unfortunately anyone subscribed with these older resources will need to clear the Safari push permissions and return to the site to resubscribe.

Wordpress Safari Setup

📘

macOS Only

Safari on iOS does not support web push. See our list of supported browsers here.

Apple does not support web push on iPhone and iPad at this time.