尽管有以下说明,PWA iOS Splash仍未显示 [英] PWA iOS Splash does not display despite following instructions

查看:84
本文介绍了尽管有以下说明,PWA iOS Splash仍未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作PWA,并且试图显示初始屏幕.我正在关注本教程:

I am making a PWA and I am trying to display splash screen. I was following this tutorial:

https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

对此确认:

https://www.netguru.co/codestories/few-tips-that-will-make-your-pwa-on-ios-feel-like-native

我在index.html中的代码是这样的:

and my code in my index.html is like this:

    <meta name="apple-mobile-web-app-capable" content="yes">   
 <link rel="apple-touch-startup-image" sizes="2048x2732" href="splash/apple_splash_2048.png"/>
    <link rel="apple-touch-startup-image" sizes="1668x2224" href="splash/apple_splash_1668.png"/>
    <link rel="apple-touch-startup-image" sizes="1536x2048" href="splash/apple_splash_1536.png"/>
    <link rel="apple-touch-startup-image" sizes="1125x2436" href="splash/apple_splash_1125.png"/>
    <link rel="apple-touch-startup-image" sizes="1242x2208" href="splash/apple_splash_1242.png"/>
    <link rel="apple-touch-startup-image" sizes="750x1334" href="splash/apple_splash_750.png"/>
    <link rel="apple-touch-startup-image" sizes="640x1136" href="splash/apple_splash_640.png"/>
    <link rel="apple-touch-startup-image" sizes="2048x1536" href="splash/apple_splash_2048.png"/>
    <link rel="apple-touch-startup-image" sizes="640x960" href="splash/apple_splash_640x960.png"/>
    <link rel="apple-touch-startup-image" sizes="320x480" href="splash/apple_splash_320.png"/>
    <link rel="apple-touch-startup-image" sizes="1024x768" href="splash/apple_splash_1024x768.png"/>
    <link rel="apple-touch-startup-image" sizes="2208x1242" href="splash/apple_splash_2208x1242.png"/>
    <link rel="apple-touch-startup-image" sizes="768x1024" href="splash/apple_splash_768x1024.png"/>
    <link rel="apple-touch-startup-image" sizes="2048x1536" href="splash/apple_splash_2048x1536.png"/>

全部位于主.html索引文件的标头中,该文件用作整个应用程序的模板.我完成图标操作的方式与此相同,并且可以在iOS上使用.初始版本没有(所有图标都在初始文件夹下的同一目录中).我在做什么错了?

This is all in the header of main .html index file, which serves as a template for the whole app. The same way I have done my icon thing, and it works on iOS. The splash version does not (all icons are in the same directory under splash folder). What am I doing wrong?

亲切的问候,

Grzegorz

推荐答案

现在,在iOS版本上,启动屏幕非常敏感
通过添加media属性,我能够使其仅在xcode模拟器中的iOS 11上运行.
我没有更新的iOS设备进行测试.

Right now splash screens are VERY touchy on iOS versions
I was able to make it work ONLY on iOS 11 in the xcode simulator by adding the media attribute.
I do not have a newer iOS device for testing.

我在这里找到的参考文章
https://medium.com/@applification/progressive-web-app-splash-screens-80340b45d210

Reference article I found here
https://medium.com/@applification/progressive-web-app-splash-screens-80340b45d210

该文章的工作示例
https://pwa-splash.now.sh

我的A2HS测试仪(正在进行中)
https://a2hs.glitch.me/

My A2HS tester (a work in progress)
https://a2hs.glitch.me/

这篇关于尽管有以下说明,PWA iOS Splash仍未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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