Did anybody succeed in starting a MainUI page from home screen on an iOS device?
The problem in detail is as follows:
I have chosen a custom page as the default page for my MainUI. If you try to add this page as a favorite to your home screen (i.e. creating a home screen button for that page) iOS does not let you do that.
If you try to add http://192.168.178.61:8080/#!/page/Home
to your home screen, iOS is ALWAYS cutting the path and adds http://192.168.178.61:8080
to your homescreen.
The reason for this is a file called manifest.json
which you can find here:
http://192.168.178.61:8080/manifest.json
Within that file you can see the property start_url
which makes iOS behave like the way described above.
Does anybody know any further how to overcome this problem?
I was hoping that this file can be edited but have no idea if this file is created dynamically or where t find it.
EDIT: complete solution (thanks to Yannick)
create the following two files in openHAB-conf/html
(file name can be changed):
- index.html
<html>
<head>
<link rel="apple-touch-icon" href="/res/icons/apple-touch-icon.png" crossorigin="use-credentials">
<link rel="icon" href="/res/icons/favicon.png" crossorigin="use-credentials">
<link rel="manifest" type="application/manifest+json" href="manifest.json" />
</head>
<body>
<h1>Add to homescreen now</h1>
</body>
</html>
- manifest.json
{
"name": "openHAB",
"short_name": "openHAB",
"description": "openHAB",
"lang": "en-US",
"start_url": "/#!/page/Home/",
"scope": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#e64a19",
"icons": [
{
"src": "/res/icons/128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "/res/icons/144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "/res/icons/152x152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "/res/icons/192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/res/icons/256x256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "/res/icons/512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
open http://ip.address.of.openhab:8080/static/index.html
in your browser
now you can add a link to your individual page to your home screen