Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strategy for Push notifications on Safari

I am working on implementing a PWA which needs to send push notifications, we are looking at a solution for sending push notifications to browsers running on ios(We are using Firebase(FCM) for everything else.) What would be a good strategy to make push notifications on all platforms including ios?

We are looking at sniffing the user-agent and use FCM for non-ios users, switch to websockets for ios users. We aren't sure how viable this approach is gonna be. Any suggestions on this approach or a better alternative would be of great help!

like image 638
Gunner Avatar asked Jun 30 '17 06:06

Gunner


People also ask

Can Safari send push notifications?

Safari Push Notifications work just like push notifications for apps. They display your website icon and notification text, which users can click to go right to your website.

How do I manage Safari notifications?

In the Safari app on your Mac, choose Safari > Preferences. Click Websites, then click Notifications. Deselect “Allow websites to ask for permission to send notifications.” From now on, when you visit a website that wants to send you notifications, you aren't asked.

Does Apple support web push notifications?

Web Push is supported in Mac Safari beginning with macOS Ventura. And Web Push will be coming to iOS and iPadOS next year. Apple's Safari Push Notifications have been an option for reaching Mac Safari users for quite a while.


1 Answers

It looks like you can treat Safari like an APNS device: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html

like image 151
Brent Hronik Avatar answered Oct 16 '22 07:10

Brent Hronik