2

When I go into youtube on a safari in iOS I have the widget offering me to open the installed app

How do they do that? I tried to debug the window, but probably it hides inside a minified js

Attaching a partial screenshot: enter image description here

Boaz
  • 4,652
  • 10
  • 46
  • 86

1 Answers1

5

This is part of Apple's Smart App Banners.

You can add it on your own website by adding the following meta-tag:

<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">

The app-id is the nine-digit number in between id and ?mt in App Store URLs. affiliate-data and app-argument are optional. Check the documentation for more info.

It isn't supported on third-party browsers, like Chrome for iOS. In that case you will have to do it yourself or use scripts like these:

https://github.com/ijason/Smart-App-Banners
https://github.com/jasny/jquery.smartbanner
http://kurtzenisek.com/p/smart-web-banner/

johankj
  • 1,745
  • 17
  • 33