If you’ve got an app for your website or company, odds are you’d like to let your users know about it when they visit your site.
Previously, we’d been using an annoying (yes, I know it was annoying) modal js snippet which popped up a window essentially saying “hey! we’ve got an app”. Before you could do anything you had to address this popup. These have been infamously seen all over the web, and even made it to an xkcd comic.
Lately, I’d been seeing some banners on large sites which would bring up an area in Safari.app letting me know the site had an app, and even letting me know if I had it installed, or open the App Store from there. Best of all – it was non-modal.
However, I searched and couldn’t find a reference to it anywhere. I finally found it referenced in the Safari Web Content Guide, which makes a lot of sense in hindsight. 🙂
Anyway, the code is as simple as:
pasted in the header of your site, where the 9 digit number is your app ID (found in the App Store link to your app).