tosijs-native — plan

Status: the contract and web fallback exist; hello world runs natively on macOS (Swift and Tauri), iOS and iPadOS (Swift, Simulator), Android (Kotlin, emulator) and Linux arm64 (Tauri), each passing the contract in its own web view (see SHELLS.md). The contract now also covers the capabilities in CAPABILITIES.md. On real devices (2026-12-03): the contract passes on a Samsung Galaxy A17, and the examples install and open on it and on two iPhones; the contract has not yet run on an iPhone.

Adopt one package, get a working native project for each store you target — App Store, Mac App Store, Steam, direct download — whether the shell underneath is Tauri, Electron, a Swift WKWebView shell or Capacitor. The consumer never picks a shell and never edits one.

The contract is the product

Shells are generated and managed

Per-target defaults (set by spikes, not by preference)

Target Starting default What could change it
iOS / Mac App Store Swift WKWebView shell (decided by spike 3: spikes/storekit.md) —
Mac direct Swift WKWebView shell, the same app as the Mac App Store's. It was Tauri; on the Mac the Swift shell has share, notifications, permissions, purchases and the pause hold, where Tauri's answers unavailable, at a fifteenth of the size (CAPABILITIES.md, SHELLS.md) the owner preferring one desktop shell for all three systems
Windows direct, Linux Tauri —
Steam (Windows, Mac, Steam Deck) Tauri + steamworks-rs The Linux Tauri shell cannot start inside Steam's Linux runtimes (no WebKitGTK: spikes/platforms-desktop.md), so a Steam Deck needs bundled WebKitGTK, the Windows build under Proton, or Electron. Spike 1 decides
Android Kotlin WebView shell (decided by the Android spike: spikes/android.md) —
Apple TV out of scope (no web view on tvOS); the contract stays implementable by a host with none (spikes/platforms-apple-xr.md) —
Vision Pro the iOS build runs there as it is; a visionOS build of the Swift shell compiles a visionOS simulator runtime, to run it

Spikes (each answers a go/no-go question; all use manta-recon's web build)

  1. Tauri on Mac, Windows and Steam Deck: frame rate, and whether it runs offline.
  2. Steam: steamworks-rs init, one achievement, and whether the overlay draws over the web view.
  3. iOS: one sandbox purchase and one restore with StoreKit 2, through Tauri and through a Swift shell. Which one is less code and fewer surprises? Answered: Swift, and its purchase path is tested with no person (spikes/storekit.md). A purchase in Apple's real sandbox still needs the owner's account and a device.
  4. Mac App Store: a dry run of sandbox signing and submission.

Sequence

  1. Contract: API, config schema and contract tests, plus a web fallback that passes them. Done (#3578).
  2. Hello world, native, on macOS (owner, 2026-10-31): a .app that loads the hello page (shells/hello), answers the bridge natively, and passes the contract suite inside its own web view (bun run contract:tauri). In Tauri first, then a Swift WKWebView shell built to compare with it and offered as an option. Swift is the one that could reach visionOS, and Apple TV in some form (tvOS has no WKWebView, so it would not be this web build).
  3. Then the same hello world on iOS → Android → Windows → Linux, in that order. Done but for Windows, which now comes after the capabilities work (owner, 2026-11-24: Mac, iOS and Android first).
  4. Capabilities (CAPABILITIES.md, #4236): what an app needs beyond a paid game's basics, designed for every target and built for Mac, iOS and Android first.
  5. Building from an app's own config (BUILDING.md, #4247): one description of an app that every shell's build reads, behind tosijs-native build. Done for the Swift and Kotlin shells; the hello app is built this way, and so is examples/notes.
  6. Spikes 1, 2 and 4, then shells that run manta's build. A shell lands when it passes the contract and manta's build runs in it.

Fewest viable targets. Each OS gets the smallest set of distribution formats that reaches its players, chosen deliberately rather than by what a bundler can emit. Linux is the sharpest case.

Scope