Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tamer-host

Production Lynx host templates for injecting LynxView into existing Android and iOS apps.

Overview

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

Installation

npm install @tamer4lynx/tamer-host

Usage

Inject into an existing project

After creating an Android or iOS project (or if you already have one), run:

t4l android inject
t4l ios inject

Use --force to overwrite existing files:

t4l android inject --force

Prerequisites

  • tamer.config.json with android.packageName / ios.appName and ios.bundleId
  • An existing Android project (android/app/src/main/java/, android/app/src/main/kotlin/) or iOS project (ios/<AppName>/)
  • Run t4l link after injecting to register native modules

Create flow

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.

Asset path normalization

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/, and assets/ — 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.

DevTools long-press menu

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.

Related

About

Production Lynx host templates for Tamer4Lynx

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages