Safari推送通知策略 [英] Strategy for Push notifications on Safari
问题描述
我正在努力实施需要发送推送通知的PWA,我们正在寻找一种解决方案,用于向在ios上运行的浏览器发送推送通知(我们正在使用Firebase(FCM)用于其他所有内容。)什么是好的在所有平台上制作推送通知的策略,包括ios?
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?
我们正在寻找嗅探用户代理并为非ios用户使用FCM,切换到ios用户的websockets 。我们不确定这种方法会有多可行。对这种方法或更好的替代方案的任何建议都会有很大的帮助!
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!
推荐答案
看起来您可以将Safari视为APNS设备: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications /PushNotifications.html
It looks like you can treat Safari like an APNS device: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html
这篇关于Safari推送通知策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!