beforeinstallprompt 在 iOS 中不触发 [英] beforeinstallprompt not firing in iOS

查看:40
本文介绍了beforeinstallprompt 在 iOS 中不触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 网站网址:[已编辑]
  2. 提示适用于三星互联网、Windows 桌面 Chrome、Android Chrome
  3. 提示在 Safari 或 iOS 版 Chrome 中不起作用
  4. Lighthouse 测试通过(忽略 start_url 错误,无论我是否修复都没有效果.我已经尝试过了)
  5. PWA 可安装在 Android、iOS 和 Windows 上
  6. 离线模式在 PWA 中按预期工作
  7. 当我运行灯塔测试时,我收到控制台错误(即使图像确实存在):尝试使用清单中的以下图标时出错:[redacted]/assets/icons/icon-144x144.png(下载错误或资源不是有效的图像)
  8. 清单有效且无语法错误
  9. 实际应用是一个运行在/app 上的 Angular 9 应用
  10. 在浏览器中继续"按钮应消失并替换为安装应用程序";beforeinstallprompt 触发时的按钮

PWA 在 iOS 上运行,为什么提示不起作用?

The PWA works on iOS, so why doesn't the prompt work?

推荐答案

BeforeInstallPromptEvent APIChrome 和 Edge 支持.Safari (Webkit) 不支持它并且在 iOS 所有浏览器都是底层的 Webkit.

BeforeInstallPromptEvent API is supported by Chrome and Edge. Safari (Webkit) does not support it and on iOS all browsers are Webkit under the hood.

这篇关于beforeinstallprompt 在 iOS 中不触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆