4

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?

sanchez
  • 4,519
  • 3
  • 23
  • 53
  • Could you post your HTML and manifest here so we can help? You probably know that IOS does not yet support service workers, though apparently they will be supported in the future. For now, appcache can provide offline capabilities for Apple web apps. – IanC Mar 26 '18 at 16:08
  • I have an app that looks great on my iPhone. But, I was showing it to a friend and things worked a bit differently. On my phone, a link opens in the browser. On hit phone it opened in another cromless window (like what you get when you launch from the homescreen). – user341493 May 17 '18 at 18:43

2 Answers2

1

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.

ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56
  • tested this and not working in iOS 11. I tried the `GitHub forum` methods too all not working. I am using `laravel` and at one point i seems to be able to route to error page without launching browser, but not sure how. However that is not with `javascript`. I still investigate how to make it work. – sooon May 28 '18 at 12:20
-1

Service workers are not yet supported in iOS devices. Unless the web app is programmed as a single-page application, I believe that it will always open it up in browser mode.

oninross
  • 989
  • 6
  • 23