1

We want to test if our implementation of web-push notifications will run in Safari 16 as well. So we downloaded the "Safari Technology Preview" 148 from https://developer.apple.com/safari/resources/ to test our implementation of Web-Pushs on macOS Monterey 12.4.

We use this code to detect if a browser supports Web-Pushes:

function WebPushSupported()
{   if (!window.Notification)
    {   return false;
    }
    
    if (!('serviceWorker' in navigator))
    {   return false;
    }
    
    if (!('PushManager' in window))
    {   return false;
    }   

    return true;
}

This works fine in Chrome, Firefox and so on, but Safari 16 has no object "PushManager" in window.

Are WebPushes through the Push-API still not supported in Safari 16?

Werner
  • 1,695
  • 3
  • 21
  • 42
  • The following link states that it is partially supported – Ibrahim Rehman Jul 05 '22 at 04:30
  • https://developer.mozilla.org/en-US/docs/Web/API/PushManager – Ibrahim Rehman Jul 05 '22 at 04:30
  • 1
    Thank you! I still can't figure out what "partially supported" means, because either I do have a PushManager-object or I don't... – Werner Jul 05 '22 at 08:40
  • Hi, I just stumbled on this Apple developer documentation. It details some onerous steps plus the proper JS to test for push capabilities in Safari `'safari' in window && 'pushNotification' in window.safari` : https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW8 – GGGforce Dec 24 '22 at 09:13
  • Din anyone managed to make push API notifications in Safari 16 work? I tried firebase messaging web v9 and it seem to work in background (when delivered by the service worker) but in foreground only receives notifications 3 times, then it stops working. – Andrei F Feb 02 '23 at 13:00

0 Answers0