I have a problem with my app url scheme and I can't figure out how to get ride of it:
- The scheme works like a charm but It get annoying when someone open the URL in Safari, I have tried various workarounds with JS but I still get the ERROR POPUP if user comes with iOS device and does not have my app installed. Any ideas?
Code:
<script language="javascript">
var timeout;
function open_appstore()
{
window.location='itunes.com/';;
}
function try_to_open_app()
{
timeout = setTimeout('open_appstore()', 300);
}
</script>
<a onClick="javascript:try_to_open_app();" href="yourappurl:">App name</a>