I'm trying to launch my app in case it is installed and fallback to my website if tbe the app does not exist. (got some insights from : How to check if an app is installed from a web-page on an iPhone?
I was able to launch the app using custom url scheme , but was only able to so when there is user interaction (e.g. user clicks a button/link) :
<a onclick="window.open('myapp://foo=bar', '_system')">Launch myapp</a>
However When using
window.open('myapp://foo=bar', '_system');
or
window.location = 'myapp://foo=bar'
without user interaction (e.g. on window load / document ready) the app does not launch.
Is this expected ?
Any workarounds ?
Thanks Sagi