Chances are you idly noted ‘Smart App Banners’ in the WWDC hoopla — oh, you didn’t? Well, to refresh your memory,
… Instead of those annoying overlays that many mobile sites show you to alert you of their mobile apps, Apple will use a more unified system in iOS 6. Instead of these banners, Apple will now show a link to the App Store (or to the app, if you have already installed it) when you open a site that also offers a mobile app. Apple calls this feature “Smart App Banners” …
– and didn’t think further than “well, that’s another mild annoyance smoothed out of the way”, right? Well, actually, they’re smarter than that; not only can they notify your web surfer of the native app, they can deep link into it:
… The second kind of problem that the banners solve in a smart way is to actually allowing website makers to deep-link to specific content. Like in the TED example above I’ve opened up a page of an individual video. If I have the TED.com app installed then tapping the banner button should also open up the app to this very same video.
This is achieved by the second (optional) parameter in the tag, named “app-argument”. This has to be a valid URL because it is passed as NSURL into the app, similar to launching the app with a custom URL scheme. Here TED.com simply passes the URL of the video page to the app because this is probably the permalink to this piece of content. Their app will know how to go to the video that corresponds to this URL…
Nifty, huh? Nagging the user to install an app, that’s mostly just annoying, but giving them a good reason to, now that’s useful!