I know that <a href="twitter://">Twitter Link</a>
will open the Twitter app on iOS from a webpage in Safari.
However if the app is not installed we get an error popup...
Edit: (I've seen the other answers where a setTimeout checks is there has been a popup or not. I'm hoping for something much cleaner)
Is there a way to avoid the error. Hopefully by knowing if the app is installed and redirecting the page within Safari.