Created
February 28, 2013 15:45
-
-
Save melvynhills/5057675 to your computer and use it in GitHub Desktop.
Launch an iOS app if it's installed, or redirect to the App Store.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function openIOSApp() { | |
window.location = "my-app-scheme://"; | |
setTimeout(function() { | |
window.location = "itms://itunes.apple.com/us/app/my-app-name/my-app-id"; | |
}, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on this comment on StackOverflow: http://stackoverflow.com/questions/1108693/is-it-possible-to-register-a-httpdomain-based-url-scheme-for-iphone-apps-like/1109200#comment2369319_1109200