Strategy for Push notifications on Safari

ぃ、小莉子 提交于 2019-12-22 04:46:08

问题


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!


回答1:


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



来源:https://stackoverflow.com/questions/44839731/strategy-for-push-notifications-on-safari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!