'Open App Store if app isn't installed IOS 2021
I'm trying to get IOS recognize if my app is not installed when i click in a button on my web. I have everthing that says IOS, apple-app-site-association, in our app everything is set to that, and when the app is already installed, it works! But, if the app is not installed, safary returns an incorrect message, and freeze the next code (i tried to apply the settimeout to do a redirect to the appstore)
I saw multiple cases here on stackoverflow, but none works now...
Solution 1:[1]
I think this is an unsolvable problem with plain html and javascript. iOS will always show an error popup if you click an app-link but don't have the app installed. I've seen many production sites that suffer from the issue too, like medium.com
I've also tried the famous setTimeout-hack to open AppStore a few seconds later if the user remains on the page but didn't quite get it to work at all (or without causing other issues like freezes)
The one hope for a solution is that a colleague told me about a Firebase SDK solution that promises they'll handle this for you
set up the links that will move people from your website into your native app. Don't worry if your users don't have the app installed yet; Dynamic Links can take care of that for you. https://firebase.google.com/docs/dynamic-links/use-cases/web-to-app
I haven't tried it out yet though.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
