beforeinstallprompt not firing in iOS

∥☆過路亽.° 提交于 2020-12-16 03:36:22

问题


  1. Website Url: [redacted]
  2. Prompt works in Samsung Internet, Windows Desktop Chrome, Android Chrome
  3. Prompt does NOT work in Safari or Chrome for iOS
  4. Lighthouse tests pass (ignore the start_url error, whether or not I fix that has no effect. I've tried)
  5. PWA is installable on Android, iOS, and Windows
  6. Offline mode works as expected in the PWA
  7. When I run the lighthouse test, I get console error (even though image DOES exist): Error while trying to use the following icon from the Manifest: [redacted]/assets/icons/icon-144x144.png (Download error or resource isn't a valid image)
  8. Manifest is valid and no syntax errors
  9. The actual app is an Angular 9 app running at /app
  10. "Continue In Browser" button should disappear and be replaced with "Install The App" button when beforeinstallprompt fires

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


回答1:


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



来源:https://stackoverflow.com/questions/62643717/beforeinstallprompt-not-firing-in-ios

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