I\'m launching a custom app from a web browser on the iphone.
If the app is not installed I am redirecting to a web page on the website.
If it is installed it g
I did find a solution that worked for this. I had it working with a setTimeout of 25ms. But for some reason on a nexus 5 I needed to drop it down to 5ms.
i ended up using the following:
function goToApp(appLocation, fallbackLocation) {
setTimeout(function() {
window.location = fallbackLocation;
}, 5);
window.location = "nativeappURL://" + appLocation;
}
function goToWeb(baseurl, webLocation) {
window.location =baseurl + "/"+ webLocation;
}
</script>
Then I just have two buttons that have an
onclick="goToApp('appDestination', 'location')"
and
onclick="goToWeb('webDestination', 'location')"