-3

Some websites like Quora, and others have a, "open in app" icon. How do I do that and why doesn't stack exchange do that?

Tunaki
  • 132,869
  • 46
  • 340
  • 423
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231

1 Answers1

1

To add a Smart App Banner to your website, include the following meta tag in the head of each page where you’d like the banner to appear:

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

https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html

arturdev
  • 10,884
  • 2
  • 39
  • 67
  • Thank you. When you say banner you mean something following across the very top of the page? In quota the icon is in line. Could there be another tag I can use anywhere on my page? – 1.21 gigawatts Nov 24 '15 at 21:49
  • 1
    Hmm. Actually you can do that, but the application must be installed when a user taps on that link. You can do that by using URL Schemes. Open Info.plist file add a new item called "Url Types" and then add "URL Schemes" in it, set the value say "myTestApp". Then in you webpage basically add a hyperlink with the following format: "myTestApp://" (e.g. Open the app!). Voila :) – arturdev Nov 24 '15 at 21:54
  • So the app registers a protocol like "myapp" when it's installed and then when i visit a page in the mobile browser and click on a link with href "myhref://something" the app will be open? How do you determine if the app is installed? – 1.21 gigawatts Nov 24 '15 at 22:59
  • 1
    Check this: http://stackoverflow.com/questions/13044805/how-to-check-if-an-app-is-installed-from-a-web-page-on-an-iphone – arturdev Nov 25 '15 at 09:41