Search code examples
iosservice-workerprogressive-web-appshomescreenmanifest.json

ios - Web App lauched as Homescreen switches to browser mode after page change


The Web App works great on Android, stays in homescreen mode while browsing pages.

For some reason on iPhone and iPad it switches itself to a browser mode after changing page.

I have tested in chrome application tab, and all icons, manifest and service worker are loading fine on all pages.

What could cause the web app to change to browser mode on iOS?


Solution

  • You can try to disable it using Javascript as provided in this post:

    var a=document.getElementsByTagName("a");
    for(var i=0;i<a.length;i++)
    {
        a[i].onclick=function()
        {
            window.location=this.getAttribute("href");
            return false
        }
    }
    

    There's also a github forum which discusses this predicament.