Smart App Banners for iOS and Android: setup guide and when to use a deep link instead
How to add Apple's Smart App Banner with one meta tag, pass the current page to the app with app-argument, and show an App Clip card. What Android offers in its place, how to build your own banner for Chrome and Android, and when a deep link does the job better.
A Smart App Banner is the strip Safari shows at the top of a web page to promote your iOS app. You add it with one meta tag, <meta name="apple-itunes-app" content="app-id=123456789">, and Safari does the rest: it shows "Open" if the app is installed and sends the person to the App Store if it isn't. It works only in Safari on iPhone and iPad. Android has no matching tag, so on Android and in other browsers you build a banner yourself and point it at a deep link.
Add a Smart App Banner on iOS
Put the tag in the <head> of every page that should show the banner:
<meta name="apple-itunes-app" content="app-id=123456789, app-argument=https://example.com/product/42">
| Parameter | Required | What it is |
|---|---|---|
app-id |
Yes | Your app's Apple ID, the number shown in App Store Connect and in the app's App Store URL after id |
app-argument |
No | A URL that tells the app which page the person was on |
What Safari does with it, according to Apple's documentation:
- App installed: the banner opens the app.
- App not installed: the banner goes to the App Store. When the person comes back to the page, the banner shows download progress and then an Open button.
- App not available: if the device doesn't support the app, or the app isn't available in the person's region, the banner doesn't appear.
- Closed: the banner has a Close button, and "When the user returns to the webpage, the banner doesn't reappear."
There's nothing to design and nothing to host. Safari draws the banner with your app's icon and name from the App Store.
Send the person to the same content with app-argument
Without app-argument, the banner opens the app's first screen. With it, the app receives the URL you put in the tag and can show the matching screen. Generate the tag on the server so each page carries its own URL:
<!-- on /product/42 -->
<meta name="apple-itunes-app" content="app-id=123456789, app-argument=https://example.com/product/42">
The app receives that URL through its URL-opening callback. Apple's sample reads it in the app delegate's application(_:open:sourceApplication:annotation:) method; in a scene-based app, incoming URLs arrive in scene(_:openURLContexts:), and in SwiftUI in .onOpenURL. Route it with the same code that handles your other deep links, and validate it like any outside input.
One limit to know: app-argument is delivered when the banner opens an installed app. If the person installs from the banner and opens the app later from the home screen, don't count on the page arriving. Carrying a destination through an install is what deferred deep linking is for.
Show an App Clip in the banner
If your app has an App Clip, the same tag can offer it:
<meta name="apple-itunes-app" content="app-id=123456789, app-clip-bundle-id=com.example.app.Clip, app-clip-display=card">
Apple's App Clip documentation says app-clip-display=card shows the App Clip card in Safari or an SFSafariViewController on iOS 15 and later, and that keeping app-id lets the banner open the full app on devices where App Clips aren't allowed. The website must be associated with the App Clip through the appclips section of the apple-app-site-association file, and the person must not be in Private Browsing. Apple also notes that the app-argument value isn't available to App Clips.
Where Smart App Banners don't show
- Chrome, Firefox and other browsers on iOS. The banner is a Safari feature.
- In-app browsers such as the ones in Instagram and Facebook, where much social traffic lands.
- Inside a frame. Apple: "You can't display Smart App Banners inside a frame."
- The iOS Simulator. Apple: "Banners don't appear in the iOS simulator." Test on a phone.
- Android, on any browser.
- After the person closes it on that page.
You also get no numbers from it. Safari doesn't tell your page whether the banner was shown or tapped.
Is there a Smart App Banner for Android?
Not as a meta tag. Chrome on Android has a native app install prompt that reads the web app manifest:
{
"short_name": "Example",
"name": "Example Store",
"icons": [
{ "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" }
],
"prefer_related_applications": true,
"related_applications": [
{ "platform": "play", "id": "com.example.app" }
]
}
Chrome's documentation lists the conditions: neither the web app nor the native app is installed, the manifest has a name, a short name and 192px and 512px icons, prefer_related_applications is true, and the site is served over HTTPS. Chrome then fires beforeinstallprompt, and your page calls prompt() from a button tap to show the install dialog.
Treat it as an extra, not as the plan:
- It doesn't draw a banner. You still build the button that triggers it.
- Chrome's page says the prompt is supported only in the stable release of Chrome, and MDN marks
related_applicationsas experimental and not available in all widely used browsers. - MDN notes that in Chromium browsers
prefer_related_applicationsmust befalseor left out for your web app itself to be installable, so you choose one or the other. - It installs the app. It doesn't open a particular screen afterwards.
For most sites, a banner you build yourself is simpler and works in every browser.
Build your own banner (works everywhere)
A custom banner is a strip of HTML with one link. What matters is where the link points. Make it an https deep link that opens the app when it's installed and goes to the right store when it isn't:
<div id="app-banner" class="app-banner" hidden>
<img src="/icon-64.png" alt="" width="32" height="32">
<span>See this product in the Example app</span>
<a href="https://links.example.com/product/42">Open</a>
<button type="button" id="app-banner-close" aria-label="Close">×</button>
</div>
<script>
const banner = document.getElementById("app-banner");
const isPhone = /Android|iPhone|iPad/.test(navigator.userAgent);
if (isPhone && !localStorage.getItem("app-banner-closed")) banner.hidden = false;
document.getElementById("app-banner-close").onclick = () => {
banner.hidden = true;
localStorage.setItem("app-banner-closed", "1");
};
</script>
Four rules make it behave:
- Put the link on a different host from the page. On iOS, a tap on a link to the domain you're already on stays in Safari. A link on
links.example.comfrom a page onwww.example.comopens the app. See Universal Links in Chrome on iOS for the other cases. - Let the person tap. Don't redirect to the app when the page loads. Universal Links and App Links need a tap, and an automatic jump to a store annoys people who wanted the web page.
- Keep it small. A slim strip at the top or bottom is fine. A full-screen "get the app" page that hides the content is the kind of interstitial Google's search guidance warns against.
- Remember the close. Don't show it again on every page after someone dismissed it.
On Android you can hide the banner from people who already have the app. Chrome 80 and later supports navigator.getInstalledRelatedApps(), which returns your app if it's installed. Chrome's documentation says it needs the app listed under related_applications in the web app manifest, an asset_statements entry in the Android app that links back to the site, and HTTPS. On iOS a web page can't find out which apps are installed, so the banner link has to work in both cases.
Smart App Banner or a deep link banner?
| Smart App Banner | Your own banner with a deep link | |
|---|---|---|
| Set-up | One meta tag | HTML, CSS and a link that routes |
| Safari on iOS | Yes | Yes |
| Chrome and in-app browsers on iOS | No | Yes |
| Android | No | Yes |
| Knows whether the app is installed | Yes, Safari does | Not needed if the link handles both |
| Opens the same content in the app | Yes, with app-argument |
Yes, through the link's path |
| Right screen after a fresh install | Not reliably | Yes, with deferred deep linking |
| Click numbers | None | Yes, from the link |
| Your own text and design | No | Yes |
A common setup uses both: the meta tag for Safari, where Apple's banner is trusted and costs nothing, and your own strip for everything else. If you do, hide your own strip in Safari on iOS so people don't see two.
Smart App Banners and Universal Links
They solve different problems. A Universal Link decides what happens when someone taps a link to your site from somewhere else: the app opens before the page loads. A Smart App Banner covers the person who is already on your page in Safari. Sites with an app usually want both, because typed URLs, same-domain taps and search visits all end on the web page, which is where the banner is. The difference between the link types is explained in Universal Links vs deep links vs URI schemes.
FAQ
How do I add a Smart App Banner to my website?
Add <meta name="apple-itunes-app" content="app-id=YOUR_APP_ID"> to the page's <head>. The app ID is the number in your App Store URL. Safari on iPhone and iPad shows the banner automatically.
Why is my Smart App Banner not showing?
The usual reasons: the page is open in a browser other than Safari, you're testing in the simulator, the tag is inside a frame, the app isn't available for that device or region, or you closed the banner on that page earlier.
Does the Smart App Banner work in Chrome on iPhone?
No. It's a Safari feature. For Chrome and in-app browsers, show your own banner that links to a deep link.
Is there a Smart App Banner for Android?
There's no meta tag. Chrome can show a native app install prompt from the web app manifest, with conditions, or you can build a banner that links to an App Link or a store link.
Can a Smart App Banner open a specific screen?
Yes, when the app is installed. Put the page's URL in app-argument and handle it in the app's URL-opening callback.
The link behind your banner
CodeOnAir doesn't draw banners. What it gives you is the link the banner points to. A CodeOnAir AppLinks link opens the app on the right screen when it's installed, sends everyone else to the App Store or Google Play, brings a new user back to that screen after the install, and counts the clicks. How it works shows the flow, and you can create a free account: the Free plan includes 100 app links.
Checked on 16 November 2026 against Apple's Smart App Banner and App Clip documentation, Chrome's documentation on the native app install prompt and getInstalledRelatedApps, and MDN's web app manifest reference.