iOS9: Try to open app via scheme if possible, or redirect to app store otherwise
The iframe trick no longer works -- my guess is that Apple knows it will encourage more developers to implement Universal Links, more quickly.
You can still set window.location='your-uri-scheme://';
and fallback to the App Store after 500ms. There is a "dance" between popups if you take this approach, as we do at Branch (we do as a fallback if Universal Links don't work).
window.location = 'your-uri-scheme://'; // will result in error message if app not installedsetTimeout(function() { // Link to the App Store should go here -- only fires if deep link fails window.location = "https://itunes.apple.com/us/app/myapp/id123456789?ls=1&mt=8";}, 500);
I wish I had a better answer for you. iOS 9 is definitely more limited.
For a helpful overview of what's needed for Universal Links should you go that route, check out my answer here or read this tutorial
As already mentioned setting window.location
on iOS 9 still works. However, this brings up an Open in App dialog. I've put an example on https://bartt.me/openapp that:
- Launches Twitter when the Open in Twitter app is clicked.
- Falls back to the Twitter app in the App Store.
- Redirects to Twitter or the App Store without the user selecting Open in the Open in App dialog.
- Works in all browsers on iOS and Android.
Look at the source of https://lab.bartt.me/openapp for more information.
Maybe try giving you app support to Universal Links
Idea:Avoid custom (JavaScript, iframe) solutions in Safari, replace you code with a supported Universal Link.
Example
<html><head>...</head><body> <div class"app-banner-style"> <a href="http://yourdomain.com">In app open</a> </div>...content</body></html>
if you app support Universal Links (e.g. yourdomain.com), you muss configure your domain (and path) and iOS9 should be react to it link opening you App. That is only theory, but I guess should be work :)