Not my preferred solution, but in a DeyaEldeen comment, the way I met a lot of our needs was to use the meta tag instead (in the <head> page):
<meta name="apple-itunes-app" content="app-id=5555555555">
This means that whenever iOS users browse the site, they appear at the top of the page as "view in the app store." As soon as they click on the popup, they get to the app store.
See Apple Docs for Smart Banners .
Hope this helps some people with similar needs.
source share