iPhone Webapp 启动画面空白

发布于 2024-12-21 02:02:06 字数 2485 浏览 6 评论 0原文

我有一个正在使用 jquery mobile 开发的移动网络应用程序。我提示用户可以使用 添加到主屏幕 功能来加载网络应用程序从桌面。当我在 iPhone 3GS 上测试启动画面的功能时,我希望加载的 png 文件不会随启动画面一起加载,而是加载网站的“屏幕截图”,顶部有一个空白,其中看来地址栏曾经是。

这是我的代码

<html><head>

<title>Page Title</title>
<meta content='yes' name='apple-mobile-web-app-capable'> 
<meta content='default' name='apple-mobile-web-app-status-bar-style'> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/jquery.mobile.1.min.css" />
<link rel="stylesheet" type="text/css" href="css/mydashboard.min.css" />
<link rel="stylesheet" href="css/add2home.css">

<link rel="apple-touch-icon-precomposed" href="touch-icon-iphone.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="touch-icon-ipad.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="touch-icon-iphone4.png" />

<!-- ***Here is my code for splash screen*** -->
<link rel="apple-touch-startup-image" href="Default.png" />
<link rel="apple-touch-startup-image" href="touch-splash-ipad-land.png"  media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)" />
<link rel="apple-touch-startup-image" href="touch-splash-ipad-port.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" />

<!-- ***My JS files are included under this and the closing of the head tag*** -->

,我尝试了 320x460 和 320x480 png 文件,其中 Default.png 所在。两者都没有取得任何成功。根据我所读到的内容,我认为我这样做是对的,但也可能是错的。我的观点基于 https://developer.apple.com /library/archive/qa/qa1588/_index.htmlhttps://developer.apple.com/ Library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

所以我的问题是这样的,还有其他人吗看到这个了吗?如果是这样,原因是什么?如果您确实解决了该问题,您采取了哪些措施来解决该问题?如果您还没有看到这个特定问题,您是否可以根据我上面的代码提出任何建议?

I have a mobile webapp that I am developing using jquery mobile. I am prompting the users that they can use the add to homescreen function to load the webapp from the desktop. When I test the functionality of the splash screen on my iPhone 3GS, the png file which I wish to load does not load with the splash screen, but rather, a "screen shot" of the site with a white-space at the top where it appears the address bar used to be.

Here is my code

<html><head>

<title>Page Title</title>
<meta content='yes' name='apple-mobile-web-app-capable'> 
<meta content='default' name='apple-mobile-web-app-status-bar-style'> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/jquery.mobile.1.min.css" />
<link rel="stylesheet" type="text/css" href="css/mydashboard.min.css" />
<link rel="stylesheet" href="css/add2home.css">

<link rel="apple-touch-icon-precomposed" href="touch-icon-iphone.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="touch-icon-ipad.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="touch-icon-iphone4.png" />

<!-- ***Here is my code for splash screen*** -->
<link rel="apple-touch-startup-image" href="Default.png" />
<link rel="apple-touch-startup-image" href="touch-splash-ipad-land.png"  media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)" />
<link rel="apple-touch-startup-image" href="touch-splash-ipad-port.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" />

<!-- ***My JS files are included under this and the closing of the head tag*** -->

I have tried a 320x460 and a 320x480 png file where the Default.png is. Neither have had any success. From what I've read, I think I'm doing this right, but I could be wrong. I'm basing my opinion on https://developer.apple.com/library/archive/qa/qa1588/_index.html
and
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

So my question is this, has anyone else seen this? If so, what was the cause and what did you do to resolve the issue if you did resolve the issue? If you haven't seen this particular issue, is there anything you might be able to suggest based on my code above?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

堇色安年 2024-12-28 02:02:06
  1. Default.png 文件必须为 320x460 像素。
  2. 尝试从主屏幕中删除启动器,然后从 Safari 中重新添加。

这就是我必须做的才能让我的工作正常进行。

  1. The Default.png file MUST be 320x460px.
  2. Try removing the launcher from the home screen and re-adding it from Safari.

That is what I had to do to get mine to work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文