Installed web apps and hybrid shells
How to ship a family product's web UI as an app: added to the home screen, wrapped as an Android Trusted Web Activity, or inside a Capacitor 8 shell. The UI stays the web package; this page covers what changes around it.
Three forms are covered (canonical §18, D-APP-01, D-APP-57):
- Installed web app: the product's site added to the home screen (a PWA), on its real origin in the real browser engine.
- Trusted Web Activity (TWA): an Android app that opens the product's site full screen in the user's browser, verified by Digital Asset Links.
- Capacitor shell: a native container (Capacitor 8) around the product's web UI, with its own app store listing.
What was verified in this release (D-APP-61): the web package and the shell layer run in a browser and are checked by tools/mobile-audit.cjs at phone widths, in landscape and in standalone mode. The Capacitor configuration and the shell script on this page were written against the cited documentation and the published type declarations of Capacitor 8.6.2, and they parse; they were not run in a shell or on a device in this build. Every platform fact on this page links its source; the facts were read on 16 to 21 November 2026, when the current releases were Safari on iOS 27.2, Chrome and Android System WebView 157, and Capacitor 8.6.2 (BCD, Capacitor on npm).
- Rules at a glance
- Choose the form
- The installed web app
- The shell layer of the reference CSS
- Status bar and edge-to-edge
- The keyboard
- Back
- Pull to refresh and overscroll
- Text size and zoom
- Passkeys and Sign in with Global ID
- Device features
- Capacitor plugins
- Minimum versions
- Example: Capacitor configuration
- Example: the shell script
- Release checklist
Rules at a glance
| Rule | Decision IDs |
|---|---|
The web package is the UI: tokens/oait.css, reference/oait-ui.css and its shell layer, unchanged. Nothing is restyled for the shell |
D-APP-57 |
A Capacitor shell sets data-shell on <html>; an installed web app is detected by display-mode: standalone. Both switch on the shell layer |
D-APP-57 |
Insets are read through --oa-safe-top, --oa-safe-bottom, --oa-safe-start and --oa-safe-end, so a shell can supply them. The arithmetic stays "own padding + inset" |
D-APP-58, D-APP-35 |
| Draw edge-to-edge: the status bar is transparent, the header paints under it, and its icons follow the theme | D-APP-35, D-APP-59 |
A focused field is never hidden by the keyboard. Capacitor on iOS uses the Keyboard resize mode none |
D-APP-36, D-APP-59 |
| Back closes the top overlay, then goes back in history, then leaves the app. Every screen that is not a tab root shows a back control in the top app bar | D-APP-42, D-APP-59 |
| Inputs keep a font size of 16px or more. Zoom is never disabled | D-APP-17, D-APP-59 |
| Passkeys and "Sign in with Global ID" need the real origin, or the platform's app association, or the system browser session; never an embedded web view of another product | D-APP-46 |
theme-color matters only in installed web apps and Trusted Web Activities |
D-APP-59 |
| Haptics are optional, never the only feedback, and come only from Capacitor's Haptics plugin | D-APP-31 |
| Capacitor's first-party plugins are allowed; the ban on third-party scripts (DESIGN.md rule 10) still holds | D-APP-59 |
| A store app that is only a web view risks rejection: a wrapped product ships at least one app-only capability and says which | D-APP-04 |
| Nothing locks orientation, hides the status bar for good, or disables zoom | D-APP-38, D-APP-17 |
Choose the form
Which form a product ships is the product's decision. Default: Global ID stays an installed web app, because it already ships a manifest, an offline pass page and a service worker, and its passkeys belong to its own origin.
| Installed web app | Trusted Web Activity | Capacitor shell (bundled web assets) | |
|---|---|---|---|
| Where the page runs | The browser engine, on the product's origin | The user's browser on Android, on the product's origin, full screen once Digital Asset Links verify (Chrome) | WKWebView or Android System WebView, on a local origin: capacitor://localhost on iOS and https://localhost on Android by default (Capacitor config) |
| Platforms | Android and iOS | Android only, Chrome 72 or later (Chrome) | Android and iOS |
| Passkeys on the product's own origin | Work as in the browser | Work as in the browser (inferred: the page is drawn by the user's browser; not tested) | The page is not on the relying party's origin; see Passkeys |
| Offline | The product's service worker | The product's service worker | Assets are in the app bundle. A service worker in WKWebView needs App-Bound Domains (BCD) |
| Push | iOS 16.4 and later only for a web app on the Home Screen (WebKit); Android through the browser | Through the browser | Only with @capacitor/push-notifications: neither web view has Web Push (BCD) |
theme-color |
Used | Used | Not used; the System Bars plugin sets the bar icons |
| Store review | None | Google Play | App Store and Google Play: see Store policy |
| Loading the live site instead of bundled assets | Not applicable | Not applicable | server.url is documented as "not intended for use in production" (Capacitor config) |
Pick in this order:
- Installed web app when the product's features work in the browser. It keeps the origin, the passkeys, the service worker and the install page the product already has.
- Trusted Web Activity when the product needs a Google Play listing and nothing native: it is the installed web app, packaged.
- Capacitor shell when the product needs an App Store listing or a capability the web does not give on iOS (haptics, raised screen brightness, native share on Android, push inside an app). Name the app-only capabilities before you start, because store review asks for them.
Store policy
Apple's App Review Guidelines, last updated October 16, 2026 (App Review Guidelines):
4.2 Minimum Functionality: "Your app should include features, content, and UI that elevate it beyond a repackaged website. If your app is not particularly useful, unique, or “app-like,” it doesn’t belong on the App Store."
4.2.2: "Other than catalogs, apps shouldn’t primarily be marketing materials, advertisements, web clippings, content aggregators, or a collection of links."
Google Play policy:
Spam, "Webviews and Affiliate Spam": "We don’t allow apps whose primary purpose is to drive affiliate traffic to a website or provide a webview of a website without permission from the website owner or administrator." (Google Play: Spam)
"Limited Functionality and Content": "We do not allow apps that only have limited functionality and content." Its first example: "Apps that are static without app-specific functionalities, for example, text only or PDF file apps" (Google Play: functionality)
What this means for a family product: the University owns the sites, so permission is not the question; functionality is. A Capacitor shell ships at least one capability the website does not have on that platform (an offline pass in the bundle, push, haptics on a scan verdict, native share, raised brightness on the pass) and works offline to a useful degree (D-APP-04).
The installed web app
The family's manifest, icon kit and theme color are set in Brand: icons, manifests, and page meta (canonical §1.6, D-BCP-11). This section says what each part does on each platform today.
Manifest members
| Member | Family value | Android (Chrome) | iOS and iPadOS (Safari) |
|---|---|---|---|
name, short_name |
the product name; short_name by the 12-character rule |
Required for install: name or short_name (web.dev) |
Used |
id |
stable per product | Chrome Android 96 (BCD) | Safari iOS 16.4 (BCD) |
start_url, scope |
start_url with ?source=pwa |
start_url required for install (web.dev) |
Used |
display |
standalone |
fullscreen, standalone, minimal-ui or window-controls-overlay qualify for install |
Only standalone is supported (web.dev) |
icons |
any 192 and 512, maskable 192 and 512 as separate entries, the SVG |
A 192px and a 512px icon are required (web.dev) | Used only when no apple-touch-icon is present (Safari iOS 15.4, BCD). The family always ships the 180px touch icon, so iOS uses it |
theme_color |
light surface, #fff8f5 |
Status bar color in the installed app; the splash screen (web.dev) | Used (Safari iOS 15, BCD); the <meta name="theme-color"> tag overrides it |
background_color |
light surface, #fff8f5 |
The splash screen's ground (web.dev) | Ignored (web.dev) |
lang, dir |
per manifest | Used | Used |
orientation |
never set (D-BCP-25, D-APP-38) | Supported (Chrome Android 39) | Not supported (BCD) |
shortcuts |
a product decision | Chrome on Android shows the first three (web.dev) | Not supported (BCD) |
display_override, launch_handler |
not used | Experimental (Chrome Android 89 and 110, BCD) | Not supported (BCD) |
- Chrome also wants a moment of engagement before it offers install: one tap and 30 seconds on the page (web.dev).
- From iOS and iPadOS 26, any site added to the Home Screen opens as a web app by default, and the person can turn "Open as Web App" off (WebKit, WebKit). So every product page must work in standalone mode, not only the ones a product promotes for install.
- Detect standalone with
@media (display-mode: standalone)(Safari iOS 12.2 and Chrome Android 42 by BCD; web.dev). The shell layer uses exactly this query.
Icons
- Opaque icons only: iOS, iPadOS and Android 8 and later fill transparency with a color the site cannot choose (web.dev). The family's touch and
anyicons are opaque#fff8f5(canonical §1.6). - Maskable icons keep the mark inside a centered circle of radius 40% of the icon width (web.dev). The family draws the mark at 60% of the icon, inside that circle (canonical §1.6).
- A maskable icon is its own manifest entry, never
"purpose": "any maskable"(web.dev). "purpose": "monochrome"is defined as an alpha mask (MDN); no platform support table was found, so the family does not rely on it.
Theme color
theme-color has a visible effect in fewer places each year. Set it as canonical §1.6 says (light surface, and the dark twin only in a product that ships dark), and know where it shows:
| Surface | Effect today |
|---|---|
| Installed web app on Android, Trusted Web Activity | Paints the status bar (web.dev) |
| Chrome tab on Android | Ignored while the system dark theme is on, unless the page is an installed PWA or a TWA (BCD) |
| Installed web app on iOS | Tints the status bar, unless black-translucent is set (web.dev) |
| Safari tab on iOS 26 and later | Not used: "From Safari on iOS 26, the theme color is only used for installed web apps" (BCD) |
| Android System WebView, WKWebView, Capacitor | Never used; the shell sets the bar icons with the System Bars plugin (Status bar) |
theme-color takes a media attribute, so the dark twin is <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#19120e"> (MDN). The theme toggle updates the tag when the user overrides the system (theme toggle). Never orange or violet (canonical §1.6).
The iOS launch image and the Apple meta tags
- iOS does not build a splash screen from the manifest (web.dev). Without a startup image it shows a white screen or the last screenshot (web.dev, Apple archive).
- A
<link rel="apple-touch-startup-image">must match the launch window exactly, one image per device size (web.dev). The family does not require them: the first paint is thesurfacebehind the page (htmlandbodybackgrounds), which is close to the family's launch rule, a plainsurfaceframe with no logo and no text (D-APP-55). A product that adds them draws plainsurfaceframes, light and dark, with no mark and no words. - Never set
apple-mobile-web-app-status-bar-styletoblack-translucent. That value puts the page under the status bar but forces white status icons and ignores the theme color (web.dev), which fails on the lightsurface. Google's course says not to rely on the Apple meta tags at all; they are only a fallback for when the manifest fails to load (web.dev), so a new product adds none. Migration: Tamakkan's product pages setblack-translucenttoday; remove it. Global ID'sapple-mobile-web-app-capablewith thedefaultstyle may stay as that fallback.
The shell layer of the reference CSS
reference/css/shell.css ships inside oait-ui.css, right after base.css (D-APP-57). A Tailwind product, which imports base.css into its base layer, imports shell.css after it (reference guide). The layer defines no class: it reads the classes of chrome and controls, and data-shell on <html>.
What switches it on
| Context | Switch |
|---|---|
| Installed web app, Trusted Web Activity | @media (display-mode: standalone): automatic |
| Capacitor shell, any other native web view host | data-shell on <html>, set by the shell's script as early as it can (example). Any value works; the example writes the platform, ios or android |
| A browser tab | Neither: the layer changes nothing |
What it does
| Effect | Why | Source |
|---|---|---|
overscroll-behavior-y: none on the root scroller (html and body); inner scrollers keep their own contain |
Switches off the browser's pull-to-refresh, which Chrome on Android also runs in installed PWAs, and the bounce of the whole frame: contain stops scroll chaining but may keep the bounce, none removes both |
Chrome, web.dev, MDN |
surface behind the page |
WKWebView paints the overscroll area with a color taken from the html and body backgrounds |
Apple |
No text selection and no long-press callout on chrome and controls (user-select: none with its -webkit- prefix, -webkit-touch-callout: none): bars, navigation items, tabs, menus, buttons, chips, segments, choices and pressable rows. Content, IDs, codes and every text field stay selectable |
Google's PWA guidance limits user-select: none to UI elements; Safari on iOS needs the prefix; the callout property exists only in iOS WebKit |
web.dev, MDN |
touch-action: manipulation on controls |
Taps stay immediate at every zoom level, while pan and pinch zoom stay on | WebKit, MDN |
What it never does: touch-action: none on a page region (it can block zoom: MDN), user-select: none on content, hiding the status bar, or changing any token.
Safe-area variables
base.css defines the insets once, and every rule of the reference CSS that pads or offsets by an inset reads these properties, never env() itself (D-APP-58):
| Property | Default | Used by |
|---|---|---|
--oa-safe-top |
env(safe-area-inset-top, 0px) |
the header and top app bar, the skip link |
--oa-safe-bottom |
env(safe-area-inset-bottom, 0px) |
the navigation bar, bottom sheets, the sticky action bar, the snackbar host, the document footer |
--oa-safe-left, --oa-safe-right |
env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px) |
the physical pair a shell overrides |
--oa-safe-start, --oa-safe-end |
the left or right property, following dir |
full-bleed parents, the app shell's main column |
--oa-keyboard-inset |
0px |
bottom sheets and dialogs, which lift by it; a shell's script sets it (keyboard) |
The defaults have zero specificity, so a shell's own rule on :root wins. A shell overrides the physical four; start and end follow.
- Own padding plus inset. A bar keeps its own padding above the home indicator:
calc(1rem + var(--oa-safe-bottom)). WebKit's own article combines them withmax(padding, inset)instead (WebKit); the family adds them on purpose, so the bar's padding is never eaten by the inset. The sum is never smaller than themax()(D-APP-58, D-LAY-17). Layout: safe areas has the full table. - Insets are not margins. An inset can be 0, for example the side insets of an iPhone in portrait (WebKit), so gutters are always added to it (D-APP-35).
viewport-fit=coverstays on every page (canonical §4.10). Without it iOS insets the page inside the safe area (WebKit) and Chrome 135 and later shows a bar over the gesture area (Chrome).
How a shell supplies the insets
env(safe-area-inset-*) is right in browsers, installed web apps, Trusted Web Activities and WKWebView. Android System WebView is the exception:
- It forwarded system-bar and cutout insets to the page from M136 for full-screen web views only, and from M144 for every web view (Chromium, Android).
- Capacitor states that WebView below 140 gives wrong
env(safe-area-inset-*)values (Capacitor System Bars). - Capacitor shells. Keep the System Bars plugin's
insetsHandling: "css"(the Capacitor 8 default). On WebView below 140 the plugin pads the web view natively and injects--safe-area-inset-top,-right,-bottomand-leftwith the right values; on newer web views it followsviewport-fit=coverand injects the same variables (Capacitor System Bars). Capacitor 9 will default tonative(Capacitor System Bars): setcssexplicitly so an upgrade does not change it. Then point the family's physical four at the injected ones, in the product's stylesheet afteroait-ui.css:
/* Capacitor shell: prefer the insets the System Bars plugin injects (insetsHandling "css"),
and fall back to env() where nothing is injected (iOS). Start and end follow by themselves. */
:root[data-shell] {
--oa-safe-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
--oa-safe-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
--oa-safe-left: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
--oa-safe-right: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
}- Any other Android web view host. Draw the activity edge-to-edge, and never return
WindowInsets.CONSUMEDfrom the insets listener: the web view then sends no insets to the page (Chromium). If the host pads the web view natively, it zeroes the insets it has used, or the page doubles the gap (Android). A host that computes the insets itself sets--oa-safe-top,--oa-safe-bottom,--oa-safe-leftand--oa-safe-righton<html>, in CSS pixels. - iOS. Capacitor sets the web view's scroll view inset adjustment to
never(ios.contentInset, the default), so UIKit does not inset the page andenv()carries the safe area (Capacitor source). Keep it.
Status bar and edge-to-edge
Every app draws edge-to-edge: backgrounds run under the system bars, and bars and controls sit inside the insets (D-APP-35).
| Platform | What the system does | What the shell does |
|---|---|---|
| Android 15 and later | Apps that target API 35 are edge-to-edge; setStatusBarColor has no effect; the gesture bar is transparent and three-button navigation gets an 80% scrim (Android 15). Apps that target API 36 on Android 16 cannot opt out (Android 16) |
Nothing to paint: the header's own surface shows through the transparent status bar, because it pads --oa-safe-top |
| Android, Capacitor | The Status Bar plugin's overlaysWebView and backgroundColor no longer have any effect on Android 16 with Capacitor 8 (Status Bar README) |
Set the icon style with SystemBars.setStyle(): LIGHT (dark icons) on the light theme, DARK (light icons) on the dark theme (Capacitor System Bars) |
| iOS, Capacitor | The web view runs under the status bar, with the insets passed to the page | The same SystemBars.setStyle() call; on iOS it needs UIViewControllerBasedStatusBarAppearance set to YES in Info.plist (Capacitor System Bars) |
| iOS installed web app | An opaque status bar tinted by theme-color |
Nothing; the page starts below the bar |
| Trusted Web Activity, Android installed web app | The browser paints the status bar from theme-color |
Nothing |
- Set the icon style from the theme the page actually shows, never
DEFAULTalone: a light-only product on a phone in dark mode would get light icons on a light header. The shell script followsdata-themeand the system setting. - In an Android web view,
prefers-color-schemefollows the host app's theme, not the system (Android). The shell's Android theme is a DayNight theme, or the family's dark theme never appears. - Android 16 QPR2 can invert light-only apps, web views included, when the user turns on the expanded dark theme (Android). Finish the product's dark review before a store release (D-APP-27).
- Never hide the status bar for good.
SystemBars.hide()is for a screen that is truly full screen for a moment (a video, the Games stage), and the bars come back when it closes.
The keyboard
A focused field is never hidden, the main action stays reachable, and dialogs shrink to the space left (D-APP-36). The web rules of Layout: keyboard, focus, and scrolling hold in every form; what differs is what the keyboard resizes.
| Where | What the keyboard resizes | Source |
|---|---|---|
| Safari, installed iOS web apps | The visual viewport only; viewport units do not change | MDN, web.dev |
| Chrome on Android 108 and later, Trusted Web Activities | The visual viewport only, as on iOS (the default interactive-widget=resizes-visual) |
Chrome, MDN |
| Android System WebView 139 and later | The visual viewport | Chromium |
| Android System WebView before 139 | Nothing the page can see: both viewports stayed fixed | Chromium |
Capacitor on iOS, Keyboard resize native (the plugin's default) |
The whole WKWebView, so the layout viewport and vh change |
Capacitor Keyboard |
Capacitor on iOS, Keyboard resize none |
Nothing; the visual viewport works as in Safari | Capacitor Keyboard |
Rules for shells:
- Capacitor on iOS: set
Keyboard.resizeto"none"(D-APP-59). The family's keyboard rules are written for the visual viewport, as Safari behaves. Withnative, the layout viewport shrinks too, and the bottom bar's hide test (visualViewport.height * visualViewport.scale < 0.75 * innerHeight) never fires becauseinnerHeightshrinks with it. The setting exists on iOS only (Capacitor Keyboard). - Android shells get the visual-viewport behavior from WebView 139 (Chromium), which the family's minimum of WebView 140 covers. Capacitor 8's Android template sets no
windowSoftInputMode(template); Android's own advice for native hosts isadjustResizefor backward compatibility (Android). Test a long form on a device before changing either. - Never clear focus, blur a field or re-render inputs in a
resizehandler. In Android WebView 139 and later that closes the keyboard in a loop (Android). - Lift sheets and keep the focused field in view. Wherever the keyboard resizes only the visual viewport (every row of the table above except Capacitor's
nativemode and old Android web views), the keyboard covers the bottom of the layout viewport. Set--oa-keyboard-insetto the covered height,innerHeight - (visualViewport.height + visualViewport.offsetTop)and never below 0; bottom sheets and dialogs of the reference CSS lift by it (D-APP-36). When the focused field is outside the visual viewport, callscrollIntoView({ block: "center" })on it. The shell script does both; an installed web app can run the same two functions. Forms already scroll with the document or inside a scrolling sheet (canonical §4.10). - Do not build on
interactive-widget=overlays-contentor the VirtualKeyboard API. Released Safari has neither (Safari iOS 27.3, in beta, addsinteractive-widget), and Android WebView 139 and later ignores both overlay modes according to Capacitor's source (BCD, MDN, Capacitor source). - The Keyboard plugin's
keyboardWillShowandkeyboardWillHideevents carry the keyboard height (Capacitor Keyboard); use them only where the visual viewport is not enough, and remove nothing from the DOM in them. - Short windows: below 480px of height (landscape phones, split screen) the pinned chrome releases through the
short:variant, as on the web (D-APP-37, D-LAY-17).
Back
The order is fixed: back closes the topmost overlay first (menu, popover, sheet, dialog), then goes back one screen, then leaves the app from a tab root. Nothing blocks or reorders it (D-APP-42, D-APP-59).
| Where | Back today | What the product does |
|---|---|---|
| Installed web app on iOS, WKWebView | No browser back button, and the WKWebView edge-swipe gesture is off by default (allowsBackForwardNavigationGestures, Apple); Capacitor does not turn it on (Capacitor source) |
A visible back control in the top app bar on every screen that is not a tab root: arrow_back, mirrored in RTL (top app bar). Google's PWA guidance suggests the same for standalone mode (web.dev) |
| Installed web app on Android, Trusted Web Activity | The system back gesture goes back in history; from Chrome 126, <dialog> and popover close on it (Chrome) |
Use native <dialog> and popover for overlays, as the reference CSS does, and keep the visible back control |
| Capacitor on Android | Without a listener, back goes back in web view history and does nothing on the first entry (Capacitor source). A backButton listener replaces that behavior (Capacitor App) |
Register one backButton listener that applies the order above (example) |
- Capacitor's listener and predictive back. Capacitor handles back with an AndroidX
OnBackPressedCallback, and while such a callback is enabled the system's predictive back animation does not run (Capacitor App, Android). That is accepted for shells in 1.1.0: the order matters more than the animation. - Close the overlay the way Escape does. The example dispatches the dialog's
cancelevent before closing it, so a dialog that guards unsaved input keeps the same behavior on Android back as on Escape. Android's quality bar asks that back never loses data (Android). - Leaving the app uses
App.minimizeApp(), which minimizes the app and keeps its state;App.exitApp()force-quits, so use it only when the product must end a session.minimizeApp()is Android only, andexitApp()is documented for use with the Android back handler (Capacitor App). - No custom back prompts. No "Press back again to exit" message or on-screen back prompt of the shell's own: Android's quality guidelines forbid them (Android).
- The iOS edge swipe in a shell needs native code that sets
allowsBackForwardNavigationGestureson the web view, and it walks the web view's history. It is optional; the visible back control is required either way. - Router state. Back works only if every screen is a history entry: keep state in the URL, as the listing and pagination patterns already require (listing pattern).
Pull to refresh and overscroll
- No browser pull-to-refresh on the app frame. The shell layer sets
overscroll-behavior-y: noneon the root scroller (What it does). It has no effect on a container without scrollable overflow (BCD), so a short screen may still show the browser's effect; that is harmless. - Rubber-band bounce. Capacitor switches off the WKWebView's bounce on iOS (Capacitor source). In an installed iOS web app the shell layer's
noneon the root asks Safari for no bounce (overscroll-behaviorfrom Safari iOS 16, BCD); wherever a bounce still shows, the overscroll area is the page'ssurface(Apple). - Refreshing a list is a visible action in the screen, such as a Refresh button in the top app bar or the list's empty and error states, never a pull gesture alone (D-APP-44, WCAG 2.5.1). Hybrid forms have no native pull-to-refresh control in 1.1.0.
- Inner scrollers (sheets, dialogs, the navigation column, tabs) already contain their scroll chaining in the reference CSS.
Text size and zoom
The family's text must follow the user's text size to at least 200% with no loss of content or function (D-APP-17). A web view does not do that by itself, and how much it does was not verified in this build.
| Where | What is known | What the product does |
|---|---|---|
| Installed web apps, TWA | The browser's own text size and zoom apply | Nothing extra; test at 200% |
| Android System WebView | WebSettings.setTextZoom scales the page's text, default 100 (Android) |
Capacitor: read the system font scale with the Text Zoom plugin's getPreferred() and apply it with set(), at start and on resume (Capacitor Text Zoom). In the plugin's 8.0.1 source (npm), Android reads Configuration.fontScale and calls setTextZoom |
| WKWebView | Apple's Larger Text criteria ask an app whose common tasks run in a web view for "a font size controller" or to let Safari handle it (Apple) | The same plugin calls: on iOS, getPreferred() returns the body text size over 17pt and set() writes -webkit-text-size-adjust on <body> (plugin 8.0.1 source). On iPad it needs ios.preferredContentMode: "mobile" (Capacitor Text Zoom). Verify on a device that the text grows, and add an in-app text size setting if it does not |
- Never disable zoom. No
user-scalable=noand nomaximum-scalein the viewport meta: it shuts out people with low vision (MDN), and on iOS it also stops the page scrolling to the field being typed in (Apple archive). Capacitor's own switch,zoomEnabled, defaults tofalse(Capacitor config): the family's configuration sets it totrue. - Inputs at 16px or more. WebKit zooms to a focused field by the ratio 16 divided by the field's font size (WebKit source), so every editable control (input, textarea, select, search, one-time code,
contenteditable) keeps the family's 16px field text,body-lg(D-APP-59, text field). The font size is the only switch: no vendor page documents another way to avoid the zoom without disabling scaling. base.csskeepstext-size-adjust: 100%, so the browser does not inflate text on its own; the Text Zoom plugin overrides it on<body>when the shell asks.- Text inside the bars is capped at 1.3× and fixed-geometry art (ID card, QR pass) repeats its content as scalable text, as in native apps (D-APP-18).
Passkeys and Sign in with Global ID
Passkeys are bound to the relying party's domain. Global ID's relying party is id.oait.app. What each container needs:
| Container | Passkeys for the product's own origin | What it needs |
|---|---|---|
| Installed web app, Trusted Web Activity | Work: the page runs on the real origin in the real browser | Nothing beyond the web setup. A TWA's Digital Asset Links verify the app against the site (Chrome) |
| Capacitor or WKWebView on iOS | Only for a relying party that is an associated domain of the app | The webcredentials: associated domain for the relying party, and the app listed in that domain's apple-app-site-association file: "Your app can’t use passkeys to authenticate for services that you haven’t configured as the app’s associated domains" (Apple). The availability checks work in WKWebView from iOS 16.4 (same page) |
| Capacitor or a web view on Android | Only when the host enables it | AndroidX WebKit 1.12.0 or later, WebSettingsCompat.setWebAuthenticationSupport(settings, WEB_AUTHENTICATION_SUPPORT_FOR_APP) and Digital Asset Links to the website; passkey autofill (mediation: "conditional") is not supported (Android). Capacitor 8's template ships AndroidX WebKit 1.14.0 (template) but its bridge does not make the call (Capacitor source), so the shell's MainActivity adds it |
The local origin is the catch: a bundled Capacitor app runs on capacitor://localhost or https://localhost, not on the relying party's domain (Capacitor config), so in-page WebAuthn for id.oait.app is not expected to work there even with the associations above (not tested). Therefore:
- Global ID's own passkeys stay in its installed web app or a TWA (D-APP-04 default). A Global ID shell is a product decision that needs a device test of this table first.
- "Sign in with Global ID" from another product's shell opens the system browser session, never an embedded web view (D-APP-46):
ASWebAuthenticationSessionon iOS and Custom Tabs on Android. Android recommends Custom Tabs for third-party sign-in because the credential stays isolated to the identity site (Android). The first-party@capacitor/browseropensSFSafariViewControlleron iOS and builds onandroidx.browseron Android (Capacitor Browser); an Apple engineer namesSFSafariViewControllerandASWebAuthenticationSessionas the views where passkeys of other relying parties work (Apple forums). The sign-in result returns to the app through its link (the App plugin'sappUrlOpenevent). - The kit itself, its words ("face or fingerprint", with "screen lock" added on Android where the copy names the method) and the "biometrics are never the only way in" rule are unchanged (Sign in with Global ID, authentication pattern, D-APP-46).
Device features
What the web gives today, and what needs a native plugin. "BCD" is MDN's browser compatibility data, version 8.1.9 (BCD); its WKWebView rows often copy Safari's, so a WKWebView entry that rests on BCD alone is marked "verify on device".
| Feature | iOS: Safari and installed web app | iOS: WKWebView (Capacitor) | Android: Chrome, installed web app, TWA | Android: System WebView (Capacitor) | Family rule |
|---|---|---|---|---|---|
Camera (getUserMedia) |
Yes | From iOS 14.3 (WebKit); Capacitor 8 grants the web view's media request, so the system camera prompt is the only one (Capacitor source) | Yes | Capacitor 8 turns the page's request into the Android camera permission prompt (Capacitor source) | Ask at the moment of use; a denied camera shows the blocked state with "type the code instead" (D-APP-45) |
| QR decoding | BarcodeDetector: not available (Safari iOS 17 behind a flag, BCD) |
Not available (BCD) | BarcodeDetector, Chrome Android 83, experimental (MDN) |
WebView 83 (BCD) | Decode with a self-hosted decoder on every platform (Global ID ships a WASM one); BarcodeDetector only as an Android enhancement. A shell may use @capacitor/barcode-scanner |
| Share | navigator.share, Safari iOS 12.2 (BCD), from a user gesture over HTTPS (MDN) |
Verify on device | Chrome Android 61 (BCD) | Not available (BCD) | Feature-detect and keep "Copy link" (detail page); shells use @capacitor/share |
| Keep the screen awake | Screen Wake Lock: Safari iOS 16.4 partial; in Home Screen web apps from 18.4 (Apple) | Verify on device | Chrome Android 84 (BCD) | WebView 84 (BCD) | The pass screen asks for it while shown and asks again on visibilitychange, because the lock is dropped when the page is hidden (MDN) |
| Screen brightness | No web API (draft) | Native only: UIScreen.brightness, which stays until the device is locked (Apple) |
No web API | Native only | The QR pass stays scannable at normal brightness. Only a shell may raise it, with native code, and it restores the level when the pass closes |
| Haptics | None: no navigator.vibrate (BCD) |
None from the web | navigator.vibrate, Chrome Android 32 (BCD) |
Not checked | Web and installed web apps add none, so behavior matches on both systems; shells use @capacitor/haptics for the three meanings of D-APP-31 (selection: impact Light; success: notification Success; rejected: notification Error), which resolves silently without hardware (Capacitor Haptics) |
| Push notifications | Home Screen web apps only, iOS 16.4 (WebKit) | Not available (BCD) | Yes | Not available (BCD) | Shells use @capacitor/push-notifications. Ask in context, never at launch (D-APP-45) |
| App badge | navigator.setAppBadge(), Home Screen web apps, Safari iOS 16.4 (BCD) |
Not available (BCD) | Not available in Chrome Android (BCD) | Not available | A product decision; never the only place a status shows |
| Orientation lock | Not available (BCD) | Not available from the web | Chrome Android 38 (BCD) | Not available (BCD) | Never lock, except a screen where one orientation is essential, stated per screen (D-APP-38) |
Capacitor plugins
DESIGN.md rule 10 bans third-party scripts in products. Capacitor's own first-party plugins, maintained by the Capacitor team (Capacitor plugins), are allowed in shells (D-APP-59). Versions are the latest on npm on 21 November 2026; Capacitor's plugin list names the official set (Capacitor plugins).
| Plugin | Version | Use |
|---|---|---|
System Bars (in @capacitor/core) |
8.6.2 | Insets (insetsHandling: "css") and the bar icon style (docs) |
@capacitor/app |
8.1.2 | The back listener, minimizeApp(), resume, links back into the app (docs) |
@capacitor/keyboard |
8.0.6 | resize: "none" on iOS; keyboard events (docs) |
@capacitor/splash-screen |
8.0.2 | The launch screen; hide() as soon as the first screen has painted (docs) |
@capacitor/haptics |
8.0.2 | The three haptic meanings of D-APP-31 (docs) |
@capacitor/status-bar |
8.0.4 | Not needed with System Bars; legacy only (docs) |
@capacitor/text-zoom |
8.0.1 | The system text size in the web view (docs) |
@capacitor/share |
8.0.3 | The system share sheet |
@capacitor/browser |
8.0.5 | Sign in with Global ID in the system browser view (docs) |
@capacitor/push-notifications |
8.1.3 | Push, when the product offers it |
@capacitor/barcode-scanner |
3.1.4 | Native QR scanning, when the web decoder is not enough |
@capacitor/camera |
8.2.6 | Taking a photo (profile photos), not scanning |
@capacitor/screen-orientation |
8.0.2 | Reading the orientation only. Never to lock it (D-APP-38); it has no effect on large screens on Android 16 for apps that target API 36 anyway (README) |
Capacitor's own UI guidance recommends Ionic Framework but does not require it (Capacitor). Family shells use no UI framework of the shell's own: the UI is the family's web package.
Minimum versions
| What | Minimum | Source |
|---|---|---|
| iOS and iPadOS | 17 for every family app (D-APP-03). Capacitor 8 itself allows a deployment target of 15; raise it to 17 in the Xcode project | Capacitor 8 |
| Android | API 26 for every family app, 29 recommended (D-APP-03). Capacitor 8's template has minSdkVersion 24; raise it to 26 in android/variables.gradle. Keep compileSdkVersion and targetSdkVersion at 36 |
Capacitor 8, template |
| Android System WebView | 140 (D-APP-03). Set android.minWebViewVersion: 140 with a server.errorPath page that tells the person to update Android System WebView. Capacitor's own minimum is 55 |
Capacitor config |
| Capacitor | 8 (@capacitor/core 8.6.2 is current; version 7's extended support ends December 8, 2026). Building needs Node.js 22 or later and Xcode 26.0 or later |
support policy, Capacitor 8 |
| Trusted Web Activity | Chrome 72 | Chrome |
| Passkeys in an Android web view | AndroidX WebKit 1.12.0 | Android |
| Features with their own floor | Web Push on iOS 16.4 (Home Screen only); Wake Lock in iOS Home Screen web apps 18.4; web view insets M144, keyboard M139 | sections above |
A product may raise a minimum, never lower it (D-APP-03).
Example: Capacitor configuration
capacitor.config.json for a family shell. The identifiers and the webDir are examples; the rest is the family's setting. Written against Capacitor's configuration reference and the plugin pages linked above, checked against the type declarations of @capacitor/cli 8.6.2, and parsed; not run in a shell in this build.
{
"appId": "app.oait.games",
"appName": "Global Games",
"webDir": "dist",
"backgroundColor": "#fff8f5",
"zoomEnabled": true,
"server": {
"androidScheme": "https",
"errorPath": "update-webview.html"
},
"android": {
"minWebViewVersion": 140
},
"ios": {
"contentInset": "never",
"preferredContentMode": "mobile"
},
"plugins": {
"SystemBars": {
"insetsHandling": "css",
"style": "LIGHT"
},
"Keyboard": {
"resize": "none"
},
"SplashScreen": {
"launchShowDuration": 500,
"launchAutoHide": true,
"backgroundColor": "#fff8f5"
}
}
}| Key | Why |
|---|---|
backgroundColor |
The web view's ground before the first paint: the light surface (#fff8f5). In the dark theme the page paints its own dark surface at the first frame, after this ground |
zoomEnabled: true |
Capacitor defaults to no zoom; the family never disables zoom (D-APP-17) |
server.androidScheme: "https" |
The default, stated so nobody changes it: web features that need a secure context keep working. No server.url: loading the live site is not for production |
server.errorPath, android.minWebViewVersion |
The family's WebView floor (D-APP-03). update-webview.html is a page of the product's bundle; its copy goes through native review like every string |
ios.contentInset: "never" |
The default: the page pads itself through --oa-safe-* |
ios.preferredContentMode: "mobile" |
The Text Zoom plugin works on iPad only with it (Capacitor Text Zoom) |
SystemBars.insetsHandling: "css" |
Correct insets on every Android web view version, and stable across the Capacitor 9 default change |
SystemBars.style: "LIGHT" |
Dark icons for the light first screen; the script switches with the theme |
Keyboard.resize: "none" |
The visual-viewport keyboard model of the web (D-APP-59) |
SplashScreen |
Plain surface, shown for the default 500ms; the script hides it as soon as the first screen has painted. On Android 12 and later the system splash is the app icon on its background, and backgroundColor does not apply there (Capacitor Splash Screen) |
On iOS also set UIViewControllerBasedStatusBarAppearance to YES in Info.plist for SystemBars.setStyle(), and the webcredentials: associated domain when the product signs in with its own passkeys.
Example: the shell script
The small script a shell adds to the web bundle: it sets data-shell, follows the theme with the bar icons, applies the system text size, wires back, supplies the keyboard inset and keeps the focused field visible, and hides the splash. Insets need no script: the CSS block in How a shell supplies the insets reads the values the System Bars plugin injects. Written against the Capacitor 8 documentation cited above, checked with node --check, and type-checked with tsc --strict against the published types of @capacitor/core 8.6.2, @capacitor/app 8.1.2, @capacitor/splash-screen 8.0.2 and @capacitor/text-zoom 8.0.1; not run in a shell or on a device in this build.
// shell.js: the family's Capacitor shell glue. Capacitor 8. Not run on a device in OAIT Design System 2.1.0.
import { Capacitor, SystemBars, SystemBarsStyle } from '@capacitor/core';
import { App } from '@capacitor/app';
import { SplashScreen } from '@capacitor/splash-screen';
import { TextZoom } from '@capacitor/text-zoom';
const root = document.documentElement;
// The theme the page shows: data-theme or the .light/.dark class first, then the system setting.
function showsDark() {
const theme = root.dataset.theme || (root.classList.contains('dark') ? 'dark' : root.classList.contains('light') ? 'light' : '');
if (theme) return theme === 'dark';
return window.matchMedia('(prefers-color-scheme: dark)').matches;
}
// Dark icons on the light surface, light icons on the dark surface.
async function syncSystemBars() {
await SystemBars.setStyle({ style: showsDark() ? SystemBarsStyle.Dark : SystemBarsStyle.Light });
}
// Follow the system text size (Android: font scale; iOS: Dynamic Type body size over 17pt).
async function applyTextZoom() {
try {
const { value } = await TextZoom.getPreferred();
await TextZoom.set({ value });
} catch {
// Leave the text at 100%: the in-app text size setting still works.
}
}
// Back: the topmost overlay first, then history, then leave the app (D-APP-42).
function closeTopOverlay() {
const open = document.querySelectorAll('dialog[open], [popover]:popover-open');
const top = open[open.length - 1];
if (!top) return false;
if (top instanceof HTMLDialogElement) {
// The same path as Escape, so a dialog that guards unsaved input can stay open.
const cancel = new Event('cancel', { cancelable: true });
if (top.dispatchEvent(cancel)) top.close();
} else if (top instanceof HTMLElement) {
top.hidePopover();
}
return true;
}
/** @param {{ canGoBack: boolean }} event The App plugin's backButton event. */
async function onBack({ canGoBack }) {
if (closeTopOverlay()) return;
if (canGoBack) {
window.history.back();
return;
}
await App.minimizeApp();
}
// The keyboard: lift sheets by the covered height, and keep the focused field inside the visual
// viewport. Never blur, refocus or re-render here (D-APP-36).
function followKeyboard() {
const viewport = window.visualViewport;
if (!viewport) return;
const update = () => {
// The part of the layout viewport the keyboard covers. With the page pinch-zoomed this
// measure means nothing, so it is 0 then.
const covered = viewport.scale > 1 ? 0 : window.innerHeight - (viewport.height + viewport.offsetTop);
root.style.setProperty('--oa-keyboard-inset', `${Math.max(0, Math.round(covered))}px`);
};
viewport.addEventListener('scroll', update);
viewport.addEventListener('resize', () => {
update();
const field = document.activeElement;
if (!(field instanceof HTMLElement) || !field.matches('input, textarea, select, [contenteditable]')) return;
const box = field.getBoundingClientRect();
if (box.top < viewport.offsetTop || box.bottom > viewport.offsetTop + viewport.height) {
field.scrollIntoView({ block: 'center' });
}
});
}
export async function startShell() {
if (!Capacitor.isNativePlatform()) return;
root.dataset.shell = Capacitor.getPlatform(); // "ios" or "android": switches on the shell layer
await syncSystemBars();
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', syncSystemBars);
new MutationObserver(syncSystemBars).observe(root, { attributes: true, attributeFilter: ['data-theme', 'class'] });
await applyTextZoom();
await App.addListener('resume', applyTextZoom);
if (Capacitor.getPlatform() === 'android') {
await App.addListener('backButton', onBack);
}
followKeyboard();
// Hide the splash once the first screen has painted.
window.requestAnimationFrame(() => {
SplashScreen.hide();
});
}Call startShell() once, as early as the product's entry module allows, so data-shell is set before the first screen paints. Products with a nonce-based content security policy load it as part of their own bundle, like any other module. Haptics are called where the verdict happens, not here: Haptics.notification({ type: NotificationType.Success }) when a scan is accepted, NotificationType.Error when it is refused (D-APP-31).
Release checklist
Before a store release or a public install page, check each item on a real iPhone and a real Android phone, in English and Arabic, light and dark:
- The product names its form and, for a store app, its app-only capabilities (D-APP-04). The store-policy lines above have been read against the build.
node tools/mobile-audit.cjspasses on the product's main screens, including the standalone run (tools guide).- Every screen that is not a tab root has a visible back control. Android back closes an open sheet, then a dialog, then goes back, then leaves from the tab root; a dialog with unsaved input stays open.
- The header paints under the status bar with no gap and no double padding; the bottom bar keeps its own padding above the home indicator; landscape keeps the side insets.
- The status bar icons are dark on the light theme and light on the dark theme, including a light-only product on a phone set to dark.
- A long form: every field stays visible above the keyboard, the main action is reachable, and the keyboard does not close by itself.
- Text at the system's largest standard size and at 200%: nothing clips or overlaps; chrome text stops at 1.3×. Pinch zoom works. No field zooms the page on focus.
- No browser pull-to-refresh on the app frame; lists have a visible Refresh action.
- Passkey sign-in works in the form shipped; "Sign in with Global ID" opens the system browser view and returns to the app.
- Camera denied: the blocked state shows the typed-code way forward and a link to Settings (D-APP-45). The QR pass scans at normal brightness and the screen stays awake while it shows.
- Haptics only for the three meanings, and every one has a visible state too.
- Offline: the shell opens with no network and shows the offline state; the bundle carries the fonts, the icon font and the offline screen.
- The splash is plain
surfacewith the app icon on Android and a plain frame on iOS, and it goes away as soon as the first screen shows (D-APP-55). - Accessibility: VoiceOver and TalkBack pass in English and Arabic; reduced motion stops the family's motion (both web views follow the system setting, MDN); Xcode Accessibility Inspector and Android Accessibility Scanner show no new issues (D-APP-53).
- Android System WebView below 140 shows the update page.
Related
- Platforms: every way to build a family app.
- Mobile apps: the app rules this page applies.
- Layout: safe areas, viewport height, the keyboard.
- Brand: icons, manifests, and page meta.
- Reference implementation: the shell layer and what a shell must set.