# iPhone home-screen polish

> Give iPhone users a fast, full-screen Home Screen app through Safari with custom icons, notch-safe layouts, theme colors, and clear install prompts.

- Canonical: https://exaspark.ai/docs/iphone-home-screen-guide/

## How Safari Home Screen apps work on iPhone

ExaSpark packages real installable Android apps for QR sharing and Google Play `.aab` distribution. On iPhone and iPad, users install your live app through **Safari Add to Home Screen** — with no Apple App Store developer fee or review delay.

When configured cleanly, a Safari Home Screen app opens full-screen without Safari's address bar or bottom toolbar and shows your custom icon on iOS. It connects directly to your live ExaSpark Cloud backend, authentication, and 0%-platform-fee Stripe checkout (standard Stripe processing fees still apply).

> **Note:** Safari Home Screen installation works on every ExaSpark plan, including **Free**, with zero annual Apple developer fee or store review wait.

## Essential iOS icons and standalone metadata

Without explicit iOS metadata, Safari saves a tiny cropped page screenshot as the Home Screen icon and opens links inside a regular browser tab. Four pieces of metadata transform an ordinary bookmark into a crisp standalone iPhone app.

| Element | Recommended setup | Why it matters on iOS |
| --- | --- | --- |
| **`apple-touch-icon`** | `180×180` PNG, opaque background, square | iOS ignores transparency (filling alpha with black) and applies its own rounded squircle mask |
| **Web app manifest** | `display: "standalone"`, `short_name` `<= 12` chars | Launches full-screen without Safari chrome and avoids ellipsis truncation beneath the icon |
| **Status bar & theme color** | `<meta name="theme-color">` matching top header | Blends the iOS clock, signal, and Dynamic Island area smoothly into your app header |
| **Viewport cover** | `viewport-fit=cover` in viewport meta tag | Lets full-bleed headers and backgrounds extend cleanly behind notches and the Home Indicator |

Keep your icon artwork centered inside the inner 70% of the `180×180` canvas with a solid brand background. Never bake fake rounded corners or drop shadows into the PNG, because iOS masks every Home Screen icon automatically.

```html
<!-- Essential iPhone Home Screen head tags -->
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<meta name="theme-color" content="#0F172A" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-mobile-web-app-title" content="Courtside" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.webmanifest" />
```

```json
{
  "name": "Courtside Studio Booking",
  "short_name": "Courtside",
  "start_url": "/",
  "scope": "/",
  "display": "standalone",
  "background_color": "#0F172A",
  "theme_color": "#0F172A",
  "icons": [
    { "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
    { "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" }
  ]
}
```

## Safe-area padding for Dynamic Island, notches, and home bars

Modern iPhones place hardware cutouts at the top of the display and a horizontal Home Indicator swipe bar across the bottom. Enabling `viewport-fit=cover` allows your background colors to fill the entire display, which means fixed headers and bottom navigation bars must explicitly respect iOS safe-area insets.

### Top and bottom inset clearances

Apply CSS safe-area environment variables to every pinned top header, sticky bottom tab bar, floating action button, and full-screen drawer so interactive controls never hide behind the Dynamic Island or collide with the bottom swipe bar.

```css
.app-header {
  padding-top: calc(12px + env(safe-area-inset-top));
}

.bottom-tab-bar {
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}

.full-screen-sheet {
  height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}
```

### Preventing Safari viewport and keyboard glitches

Three small CSS rules remove the subtle behaviors that betray a web page inside a phone shell:

- **Use `100dvh` instead of `100vh`.** Dynamic viewport height adjusts when Safari's address bar collapses, keeping bottom checkout buttons visible.
- **Keep every input at least `16px`.** iOS Safari auto-zooms the viewport whenever a user taps a text field styled under `16px`.
- **Tame scroll bounce.** Set `overscroll-behavior-y: none` on fixed app shells so pulling down never exposes blank background gaps.

## Designing clear, non-intrusive Safari install prompts

Unlike Android's browser install prompts, iOS Safari does not display an automatic system pop-up inviting visitors to install your app. Most everyday iPhone users have never noticed **Add to Home Screen** inside the Safari Share menu unless your app shows them a clear, friendly nudge.

Show an install prompt only when all four conditions are true:

- **Mobile iOS browser detected.** Avoid showing iOS instructions to Android or desktop visitors.
- **Not already installed.** Check `window.navigator.standalone` (and the `display-mode: standalone` media query) so returning Home Screen users never see the banner again.
- **Browser-aware instructions.** In Safari, point to the **Share** button followed by **Add to Home Screen**. If the visitor arrived through Instagram, TikTok, or LinkedIn's in-app browser, instruct them to tap the corner menu and choose **Open in Safari** first.
- **Respectful timing and dismissal.** Trigger the tip after a moment of value — such as completing a booking, saving a favorite, or creating an account — and remember dismissal in `localStorage` for at least 14 days.

Use this prompt to add complete iPhone Home Screen polish across metadata, icons, safe areas, and install guidance in one pass:

> **Example prompt (App):** Polish my app for iPhone Safari Add to Home Screen: generate an opaque 180x180 apple-touch-icon matching our brand palette with no transparency, configure a standalone manifest.webmanifest with a short name under 12 characters and matching theme-color meta tag, add viewport-fit=cover with env(safe-area-inset-top) and env(safe-area-inset-bottom) padding on sticky headers and bottom tabs, keep all inputs at least 16px, and show a clean dismissible bottom install banner only for non-standalone iOS visitors (guiding Safari users to Share -> Add to Home Screen, and in-app browser visitors to Open in Safari first).

## Testing and updating on a physical iPhone

Use [Browser Device Lab](https://exaspark.ai/docs/device-lab/) during everyday iteration to check iPhone framing and spacing quickly. Before launching publicly, complete one end-to-end test on a real iPhone to verify hardware cutouts, Safari caching, and sign-in persistence.

1. **Publish to your live HTTPS domain** — Deploy via [Publish, versions & rollback](https://exaspark.ai/docs/publish/). A branded domain from [Custom domains, DNS & SSL](https://exaspark.ai/docs/custom-domains-and-dns/) gives users a cleaner install prompt and reliable OAuth redirects.
2. **Open the live URL in iOS Safari** — Visit your production domain in Safari (not a social in-app browser) and confirm the dismissible install tip clears bottom navigation.
3. **Install via Share → Add to Home Screen** — Tap **Share**, select **Add to Home Screen**, confirm your `180×180` icon and short name look sharp, and tap **Add**.
4. **Verify standalone launch and checkout** — Open the Home Screen icon, verify Dynamic Island and Home Indicator clearance, sign in, close and reopen the app to check session persistence, and confirm Stripe checkout returns cleanly.

### How updates reach installed iPhone apps

Every time you click **Publish** in ExaSpark, installed iPhone Home Screen apps load your latest UI, copy, database tables, and backend logic automatically on their next open.

The only exception is the Home Screen icon and short app title. Because iOS snapshots both at install time, existing users only see a redesigned icon or renamed title after removing and re-adding the shortcut from Safari.

## Troubleshooting iPhone Home Screen issues

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| **Icon looks like a tiny page screenshot** | Missing `apple-touch-icon` tag, 404 image path, or stale Safari cache | Confirm `/apple-touch-icon.png` returns HTTP 200, republish, clear Safari site data, and re-add to Home Screen |
| **Black background or corners on icon** | Transparent PNG used for `apple-touch-icon` | Regenerate the `180×180` icon with a solid opaque background matching your brand color |
| **Sign-in pops out to regular Safari** | OAuth callback points to a different domain or opens in a new tab (`target="_blank"`) | Keep OAuth redirect URLs on your canonical Live domain and perform redirects in the same window; see [Authentication & roles](https://exaspark.ai/docs/authentication-and-roles/) |
| **Bottom nav overlaps the Home Indicator** | Missing `viewport-fit=cover` or `env(safe-area-inset-bottom)` padding | Add `viewport-fit=cover` and safe-area bottom padding to the fixed tab container |
| **Page zooms in when tapping an input** | Input `font-size` is under `16px` | Raise all mobile `<input>`, `<select>`, and `<textarea>` font sizes to `16px` or larger |
| **Visitors from Instagram cannot find Add to Home Screen** | Social in-app browsers strip Safari's install menu | Detect in-app user agents and show a two-step hint to tap **Open in Safari** first |

## Next steps

- [Android QR & iPhone app](https://exaspark.ai/docs/android/) — Compare instant Android QR installs, Google Play builds, and iPhone Safari setup.
- [Mobile UX & share links](https://exaspark.ai/docs/mobile-ux-and-deep-links/) — Perfect thumb-zone navigation, 44px targets, and resilient slow-network states.
- [Browser Device Lab](https://exaspark.ai/docs/device-lab/) — Preview iPhone, Pixel, Galaxy, and foldable screens before publishing.

## From the blog

- [Web app, mobile app or PWA?](https://exaspark.ai/blog/web-app-vs-mobile-app/) — Compare reach, friction, and maintenance across mobile delivery options.
- [What is responsive design?](https://exaspark.ai/blog/what-is-responsive-design/) — Principles for clean layouts across phones, tablets, and desktops.
- [App launch checklist](https://exaspark.ai/blog/app-launch-checklist/) — Plan pre-launch testing, distribution channels, and early user retention.
