Reputation: 39
I am using Aviarc 3.6.1 and I want to use a specific icon for when a user adds my app to their idevice home screen from Safari. I can create the apple-touch-icon.png but am not sure where to place in it my app so it will be used.
I have tried putting it in themes\screen but that doesn't seem to work.
Has anyone else managed to get this working with their app?.
Thanks, Tim
Upvotes: 0
Views: 89
Reputation: 412
Another Solution (Tested on iPhone 5S iOS 7.0.3)
<action:behaviors>
<action:when system-event="onStartupComplete">
<action:script>
<![CDATA[
var link = document.createElement('LINK');
link.rel= "apple-touch-icon";
link.href= "www/images/app_logo.png";
document.getElementsByTagName('head')[0].appendChild(link);
]]>
</action:script>
</action:when>
</action:behaviors>
Upvotes: 1
Reputation: 115
It appears there are two ways to attach an icon:
1) have the icon available at /apple-touch-icon.png
This isn't going to work in an Aviarc application, there is no direct mapping from paths to resources except under the www folder, but then the URL would include www/ so it wouldn't pick it up.
2) Add a <LINK REL="apple-touch-icon" HREF="/apple-touch-icon.png" />
tag.
This is worth investigating. I can't find anywhere that says that it has to be in the <head>
section, so it might work fine in the <body>
section. If that is the case, you can easily create a widget that will add the link tag into the body to make this happen. Shouldn't take more than a few minutes to test.
Upvotes: 0