How to open a native iOS app from a web app

Your code works if its in mobile safari but NOT if its from a bookmark on the iOS desktop. Never tried it that way before, but thats the issue. If i just set your JS to

<script type="text/javascript" charset="utf-8"> 
window.location = "myapp://myparam";
</script>

It works in browser, but when bookmarked it fails. It might have to do something with how the url is loaded when its bookmarked since there is no chrome? My guess is that apple doesn’t want booked mark pages to access local apps. Also, I’ve noticed that if I bookmark a locally hosted page, that works in mobile safari, I can’t get it to load via bookmark. Its really odd….

Best recommendation I have for you is to make it

<meta name="apple-mobile-web-app-capable" />

instead of

<meta name="apple-mobile-web-app-capable" content="yes" />

This way it will be on the home screen, but will unfortunately load with the chrome. Thats the only solution I can think of.

Leave a Comment