Production Lynx host templates for injecting LynxView into existing Android and iOS apps.
tamer-host provides the minimal native infrastructure needed to run a Lynx bundle in an existing app:
- Android:
App.java,TemplateProvider.java,MainActivity.kt - iOS:
AppDelegate.swift,SceneDelegate.swift,ViewController.swift,LynxProvider.swift,LynxInitProcessor.swift
npm install @tamer4lynx/tamer-hostAfter creating an Android or iOS project (or if you already have one), run:
t4l android inject
t4l ios injectUse --force to overwrite existing files:
t4l android inject --forcetamer.config.jsonwithandroid.packageName/ios.appNameandios.bundleId- An existing Android project (
android/app/src/main/java/,android/app/src/main/kotlin/) or iOS project (ios/<AppName>/) - Run
t4l linkafter injecting to register native modules
t4l android create and t4l ios create use tamer-host templates when the package is installed. If tamer-host is not installed, the CLI falls back to inline templates.
The host's asset-serving layer normalizes incoming request paths before resolving them against the bundle directory:
- Strips query strings and URL fragments (
?foo,#bar) before lookup. - Recognizes bundle-relative path prefixes:
.lynx.bundle/,.web.bundle/,static/, andassets/— strips the prefix and resolves from the bundle root. - Blocks path-traversal sequences (
../) so requests cannot escape the bundle directory.
These rules apply to both Android and iOS host templates and the dev-client's inline server.
The Lynx runtime can show a long-press DevTools menu. tamer-dev-app disables it at startup and uses a shake gesture + custom debug panel instead (see tamer-dev-client). For production hosts, choose explicitly: keep the default long-press behavior, or disable it the same way if you ship your own debug entry point.
- tamer-dev-client — Adds dev launcher (QR scan, HMR) on top of the host
- Embedding LynxView into Native View — Lynx guide for embedding LynxView in existing layouts