Safari Smart App Banner: Setup, Testing and Best Practices
Add a Safari smart app banner with one apple-itunes-app meta tag, pass deep links with app-argument, test it on a real iPhone and cover Android visitors.
ScreenShipper team · · 8 min read
Quick answer: A Smart App Banner is Safari's built-in strip at the top of a web page that promotes your iOS app. Add <meta name="apple-itunes-app" content="app-id=123456789"> to the head of each page, using your numeric App Store ID. Add app-argument= with a URL to deep link people who already have the app. Test on a real iPhone or iPad, because the banner never appears in the Simulator.
How to Add the apple-itunes-app Meta Tag
The whole setup is one line of markup per page.
- Find your app ID. In App Store Connect, open your app, go to General, then App Information. The number listed as Apple ID is your app ID. It's the same number that follows
idin your App Store link. - Choose the pages. Apple's instructions are to put the tag in the
headelement of each page where you want the banner, so you decide where it appears. A site-wide layout template is the easiest place if you want it everywhere. - Add the tag. The minimal version is
<meta name="apple-itunes-app" content="app-id=123456789">. - Add an app-argument (optional). Extend the content attribute with a comma:
<meta name="apple-itunes-app" content="app-id=123456789, app-argument=https://example.com/recipes/42">. - Deploy and test on a device (see the testing checklist below).
Apple documents two parameters for the content attribute:
| Parameter | Required? | What it does |
|---|---|---|
app-id | Yes | Your numeric App Store ID, which tells Safari which app to promote |
app-argument | No | A URL passed to your app when the banner opens it, so people land on the matching screen |
Render the tag in your server-side HTML rather than injecting it with JavaScript after the page loads. Server rendering is the setup Apple's documentation describes, and it removes one variable when you troubleshoot.
Passing Deep Links With app-argument
Without app-argument, the Open button only launches your app at its home screen. With it, people continue exactly where they were on the web. Apple suggests three common patterns, and you can generate the value per page on your server:
| Page type | Example app-argument | What the app should do |
|---|---|---|
| Content or product page | https://example.com/recipes/42 | Open recipe 42 |
| Search results | https://example.com/search?q=vegan+pasta | Run the same search in the app |
| Unfinished work | https://example.com/draft?session=abc123 | Load the saved session so nothing is lost |
The value can be any valid URL. Using your real page URL is usually simplest, because the routing logic already exists on the web side.
In the app, Apple's sample code reads the URL in the app delegate's open-URL callback and routes on its path and query. If your app is scene-based or written in SwiftUI, send the URL through the same deep-link handler you use for universal links or custom URL schemes, and confirm on a device that it arrives.
Frequently Asked Questions
Can I change the text or design of a Smart App Banner?
No. Safari renders the banner with a fixed design and fills in your app's details from the App Store. If you need custom copy or styling, you have to build your own banner, and you lose the trust that comes with the native one.
Why is my Smart App Banner not showing?
The usual causes are testing in the Simulator, viewing the page inside a frame, a wrong or non-numeric app ID, an app that isn't available in the device's region, or a banner the tester already closed. Work through the testing checklist above on a real device.
Is app-argument required?
No, only app-id is required. Without app-argument the banner still opens or installs the app, but people who already have it land on the home screen instead of the content they were reading.
Does the Smart App Banner work for App Clips?
Yes. App Store Connect even lists a Smart App Banner in Safari as one of the ways an App Clip card can be invoked. Follow Apple's App Clip documentation for the extra configuration, because the basic tag on its own promotes the full app.
Will the banner show on desktop Safari?
Apple describes the banner as an iOS feature, so plan for Mac and Windows visitors to see your page without it. Store badges and a QR code are the usual options for desktop visitors.
Sources
Localize your screenshots in 50 languages
Add languages to one design, translate with AI on Pro and get warnings when a headline overflows.