[英]PWA - Add to Home Screen Prompt on iOS?
I know iOS doesn't support the native 'Add to Home Screen' prompt for PWA's like android does, however what is a work around to prompt the user to shortcut the PWA?我知道 iOS 不支持 PWA 的原生“添加到主屏幕”提示,就像 android 一样,但是有什么解决方法可以提示用户使用 PWA 快捷方式?
I've looked everywhere for an example, even a simple modal window with instructions on how to save the PWA to their phone, but haven't had success in finding a viable solution.我到处寻找示例,甚至是一个简单的模态窗口,其中包含有关如何将 PWA 保存到手机的说明,但没有成功找到可行的解决方案。
edit: I tried this solution, but it did not work on iPhone.编辑:我试过这个解决方案,但它在 iPhone 上不起作用。 https://github.com/cubiq/add-to-homescreen
https://github.com/cubiq/add-to-homescreen
I forked Matias' repo last year and updated it.去年我分叉了 Matias 的 repo 并更新了它。 https://love2dev.com/pwa/add-to-homescreen-library/ As for examples of how to prompt the user that is up to you as to how you want to do that.
https://love2dev.com/pwa/add-to-homescreen-library/至于如何提示用户你想如何做的例子。 I like to 'guide the user', especially on iOS to the Add to Homescreen steps.
我喜欢“引导用户”,尤其是在 iOS 上的“添加到主屏幕”步骤。 I also made a tool, https://pwastarter.love2dev.com/ that will help scaffold out your PWA assets and create a large set of homescreen icons.
我还制作了一个工具, https://pwastarter.love2dev.com/ ,它将帮助构建您的 PWA 资产并创建大量主屏幕图标。
I am always looking for feedback on the library and PWA Starter!我一直在寻找关于库和 PWA Starter 的反馈!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.