> ## Documentation Index
> Fetch the complete documentation index at: https://weaverse.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Weaverse component configuration uses `settings`. `inspector` is deprecated; never generate it.
> Weaverse Hydrogen themes use React Router v7: import from `react-router`, never `react-router-dom` or `@remix-run/*`.
> Before using any code sample, read `@weaverse/hydrogen` in the project's `package.json`: 6.x and 5.x import from different entries and use different type names, so code for one does not build on the other.
> `@weaverse/hydrogen` 6 (Shopify Hydrogen 2026.10 and later, the version these docs show) imports from `@weaverse/hydrogen/react-router` and uses `Weaverse*` types such as `WeaverseComponentProps`, `WeaverseComponentLoaderArgs` and `WeaverseComponentSchema`; the root `@weaverse/hydrogen` entry only exports `createSchema()`, data helpers and types.
> `@weaverse/hydrogen` 5.x (Hydrogen 2026.4 and earlier) imports everything from `@weaverse/hydrogen` and uses `HydrogenComponentProps`, `ComponentLoaderArgs` and `HydrogenComponentSchema`. On a 5.x project, convert samples to these names. Upgrade to 6 only when asked (`npx @weaverse/cli@latest migrate v6`, plus the Hydrogen 2026.10 upgrade). Do not mix major versions.
> Next.js themes use `@weaverse/hydrogen` 6.2.0 or later: import client and shared code from `@weaverse/hydrogen/next` and server-only code from `@weaverse/hydrogen/next/server`. `@weaverse/next` is deprecated; never install or import it.
> For live project data (pages, theme settings, translations), use the Weaverse MCP server: https://weaverse.io/docs/developer-tools/weaverse-mcp

# Installable Mobile App (PWA)

> Turn your Weaverse Hydrogen storefront into an installable home-screen app on iOS and Android — no app store, no extra codebase, configured entirely from theme settings.

# Installable Mobile App (PWA)

Pilot can make your storefront installable as a **home-screen app** on both iOS and Android. Shoppers tap your icon and the store opens fullscreen — no browser bars, no app store review, no separate mobile codebase. Everything is configured from theme settings and branded per store.

[Pilot PWA demo](https://www.youtube.com/embed/EvbWPNSf5Cs?rel=0)

> [!NOTE]
>
> Available in Pilot from version 2026.7+. The feature is **off by default** — enabling it is always an explicit choice.

## For Merchants

### Enable the app

1. Open your project in **Weaverse Studio**.

2. Go to **Theme settings** in the top bar **→ Mobile app (PWA)**.

   ![Mobile app PWA settings in Weaverse Studio](https://mintcdn.com/weaverse/UVhkRBzbEXYQwX4U/images/pwa/theme-settings-mobile-app.png?fit=max\&auto=format\&n=UVhkRBzbEXYQwX4U\&q=85\&s=b9eaf982b816a722decfeb4098f671da)

3. Scroll down and turn on **Enable installable app**.

   ![Enable installable app setting](https://mintcdn.com/weaverse/UVhkRBzbEXYQwX4U/images/pwa/enable-installable-app.png?fit=max\&auto=format\&n=UVhkRBzbEXYQwX4U\&q=85\&s=71b557bbdeb35866c51d0270765b9790)

4. Fill in the settings:

| Setting | What it does |
| - | - |
| App name | The name under the icon on the home screen. Empty = your store name. |
| Short name | Compact name (\~12 characters) used where space is tight. |
| App icon | Square PNG, at least 512×512. Empty = your Shopify brand logo — but a dedicated square icon looks much better. |
| Theme color | Colors the status bar / window chrome of the installed app. |
| Splash background | Background color of the launch screen. |
| Show iOS install hint | One-time banner telling iPhone visitors how to install (recommended: on). |

5. Publish. That's it.

### How shoppers install it

* **Android (Chrome):** Chrome automatically shows an **Install app** prompt (or menu → *Add to Home screen*). The store opens as a standalone fullscreen app afterward.

  ![Android install app flow](https://mintcdn.com/weaverse/UVhkRBzbEXYQwX4U/images/pwa/pwa-android-illustrate.jpg?fit=max\&auto=format\&n=UVhkRBzbEXYQwX4U\&q=85\&s=dc49d904db6c62e3f1b0d5a15922bcb4)

* **iOS (Safari):** Apple never prompts on its own. Shoppers tap **Share → Add to Home Screen**. Because most people don't know this, Pilot shows a small one-time dismissible hint banner to iPhone visitors (you can turn it off).

  ![iOS Add to Home Screen flow](https://mintcdn.com/weaverse/UVhkRBzbEXYQwX4U/images/pwa/pwa-ios-illustrate.jpg?fit=max\&auto=format\&n=UVhkRBzbEXYQwX4U\&q=85\&s=8578754a1b84876f1da9424584736833)

### What it is — and isn't

* ✅ Real home-screen icon, fullscreen launch, your branding, instant updates on every deploy.
* ✅ Checkout works exactly as before — nothing about carts, pricing, or checkout is ever cached or altered.
* ❌ Not an App Store / Play Store listing (no review process — that's the point).
* ❌ Push notifications are not part of this feature yet.

## For Developers

The implementation lives entirely in the Pilot theme — four pieces, all driven by the `Mobile app (PWA)` settings group:

### Web app manifest — `app/routes/pwa/manifest.webmanifest.ts`

A resource route (registered **top-level** in `app/routes.ts`, outside the `:locale?` prefix, like `robots.txt`). It reads `context.weaverse.loadThemeSettings()` plus a small shop query, and generates the manifest per merchant:

* `name` / `short_name` fall back to the Shopify shop name
* icons fall back to the Shopify brand logo; sizes (192/512/maskable) are produced with Shopify CDN params (`width`, `height`, `crop=center`)
* returns **404 when the feature is disabled**, and caches for 1 hour

### Head tags — `app/root.tsx`

Rendered only when the feature is on: the manifest `<link>`, `theme-color`, `apple-touch-icon` (iOS ignores manifest icons), and standalone meta tags. The service worker registration is a nonce'd inline script; when the toggle is **off** it actively unregisters Pilot's worker — and only Pilot's, never third-party workers.

### Service worker — `public/sw.js`

Deliberately minimal and **whitelist-only**:

* cache-first for hashed `/assets/*` build files (immutable)
* stale-while-revalidate for `cdn.shopify.com` images, capped at 60 entries
* **everything else — HTML documents, `/cart`, `/account`, `/api/*`, checkout — is never intercepted.** Pilot's SSR documents are intentionally anonymous so Oxygen can full-page cache them; the service worker preserves that design, so personalized or price-sensitive responses can never end up in a cache.
* cache cleanup only touches `pilot-pwa-*` caches, so it can't break other software on the origin

> [!NOTE]
>
> If you customize `sw.js`, keep the whitelist approach. Adding HTML caching to an e-commerce storefront is how carts get stale and prices display wrong.

### iOS install hint — `app/components/pwa-install-hint.tsx`

A small client-only banner shown once to iOS Safari visitors (including modern iPadOS, which reports a Mac user agent). Dismissal persists in `localStorage`, with all storage access guarded so restricted browsing contexts can never break the layout.

### Extending it

* **Custom install UI on Android:** listen for `beforeinstallprompt` and call `prompt()` from your own button.
* **Push notifications:** the service worker is the future mounting point, but pushes need a backend to store subscriptions and send messages — treat that as a platform feature, not a theme tweak.
* The full design rationale lives in the Pilot repo at `.weaverse/docs/pwa-spec.md`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.