Symfony 2 Web应用程序在iOS主屏幕上显示错误的图标(Symfony 2 web app showing wrong icon on iOS homescreen)

编程入门 行业动态 更新时间:2024-10-27 23:28:44
Symfony 2 Web应用程序在iOS主屏幕上显示错误的图标(Symfony 2 web app showing wrong icon on iOS homescreen)

我有一个Symfony 2.8应用程序,我们正在尝试为iOS Safari中的“添加到家”选项做准备。

我在这里关注了Apple的文档以创建适当的链接: https : //developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

他们看起来像这样,只是通过我的图标的正确路径。

<link rel="apple-touch-icon" href="touch-icon-iphone.png"> <link rel="apple-touch-icon" sizes="152x152" href="touch-icon-ipad.png"> <link rel="apple-touch-icon" sizes="180x180" href="touch-icon-iphone-retina.png"> <link rel="apple-touch-icon" sizes="167x167" href="touch-icon-ipad-retina.png">

这就是说,当我跳上我的iPhone并尝试将网站添加到我的主屏幕时,它会给我一个Symfony徽标而不是我公司的徽标。

关于标识可能来自何处的任何想法,以及我如何才能找到正确的标识?

I have a Symfony 2.8 application that we're trying to prep for the "Add to home" option in iOS Safari.

I've followed Apple's documentation here to create the proper links: https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

They look something like this, just with the proper paths to the my icons.

<link rel="apple-touch-icon" href="touch-icon-iphone.png"> <link rel="apple-touch-icon" sizes="152x152" href="touch-icon-ipad.png"> <link rel="apple-touch-icon" sizes="180x180" href="touch-icon-iphone-retina.png"> <link rel="apple-touch-icon" sizes="167x167" href="touch-icon-ipad-retina.png">

That being said, when I hop on my iPhone and try to add the website to my homescreen, it gives me a Symfony logo instead of my company's logo.

Any ideas about where that logo may be coming from, and how I can get the correct one to show up?

最满意答案

好吧,通过与一些同事共同努力,我们发现了这一点。

我认为我正在工作的应用程序是从Symfony示例项目之一开始的,并将上面的图标包含在项目的Web目录中。 我没有把它放在那里,所以我不知道它从哪里来,直到一个同事发现它。

第二个问题是我的图标存储目录不公开。 我把它们放在/ web / icons目录中,但由于某些原因,它们在该目录中不可用。 可能是一个.htaccess文件问题,因为没有其他路线会干扰。 我们最终只是将文件移动到另一个目录。

一旦这两个问题出了问题,它就完美了。

Ok, with a combined effort with some coworkers, we figured this one out.

I think the application I'm working was started from one of the Symfony example projects, and had included the icon pictured above in the web directory of the project. I didn't put it there, so I didn't have a clue where it came from until a coworker spotted it.

The second issue was that the directory where my icons were stored weren't publicly available. I had put them in the /web/icons directory, but for some reason they were unavailable in that directory. Probably an .htaccess file issue, as there are no other routes that would interfere. We ended up just moving the files to another directory.

Once those 2 issues were out of the way it worked perfect.

更多推荐

本文发布于:2023-07-25 23:07:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1267565.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   图标   错误   屏幕上   iOS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!