iOS 上的推送通知渐进式 Web 应用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/50347859/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 09:42:10  来源:igfitidea点击:

Push notifications progressive web app on iOS

iospush-notificationprogressive-web-apps

提问by Angelo Ferrando

I need to develop a progressive web app with push notifications integrated. Searching on the web I have found diverse opinions about this subject. If I have understood correctly, for now, we cannot have push notifications in safari for mobile (but only for Desktop). Is it right?

我需要开发一个集成了推送通知的渐进式 Web 应用程序。在网上搜索我发现了关于这个主题的不同意见。如果我理解正确的话,目前我们无法在移动端 safari 中推送通知(但仅适用于桌面)。这样对吗?

Do you have any suggestions to obtain the same result (I am not an iOS expert)? I was wondering that maybe developing a native app only for push notifications purposes could be a good choice until push notification will be ready also for safari mobile.

您有什么建议可以获得相同的结果(我不是 iOS 专家)?我想知道,在推送通知也可以用于 safari 移动之前,开发一个仅用于推送通知目的的本机应用程序可能是一个不错的选择。

P.S. I am developing the PWA using Angular 2.

PS 我正在使用 Angular 2 开发 PWA。

Thank you for the support.

谢谢你的支持。

回答by Muhammad Dyas Yaskur

Unfortunately, based this postand also thisthe latest iOS version(13.3) still doesn't support some features of progressive web app:

不幸的是,根据这个帖子,也了最新的iOS版本(13.3)仍然不支持渐进式Web应用程序的一些特点:

  • Web Push Notification
  • Background Sync
  • Page Lifecycle
  • Service Workers on WebViews
  • Universal Links / Link Capturing
  • 网页推送通知
  • 后台同步
  • 页面生命周期
  • WebView 上的 Service Worker
  • 通用链接/链接捕获

Until now, no news that says will be implemented on the next version 14. As I said in the old post, I think iOS doesn't want to support these in PWA because these features have a bigger chance to be unnecessary exploited(spam, etc). And also maybe they want to force developers to create the native application rather than the progressive web application.

到目前为止,没有消息说会在下一个版本 14 上实现。正如我在旧帖子中所说,我认为 iOS 不想在 PWA 中支持这些,因为这些功能有更大的机会被不必要地利用(垃圾邮件,等等)。也可能他们想强迫开发人员创建本机应用程序而不是渐进式 Web 应用程序。