developing-capacitor-mobile
io.github.TriliumNext/Trilium/developing-capacitor-mobile
Use when working on the Trilium mobile app (`apps/mobile`, Capacitor for Android/iOS) or on the standalone code paths that only run inside it — request routing on `capacitor://` vs `https://localhost`, the native request bridges on both platforms (`TriliumRequestBridge` in Java and Swift, `native-request-bridge.ts`, which replace the service worker there; the iOS one re-types Capacitor's `capacitor://` scheme handler), the Android native streaming HTTP proxy (`TriliumWebViewClient`), the `NativeHttpHandler` sync transport, downloads and exports (the WebView saves none itself — `capacitor_download.ts` writes them and opens the share sheet), `MainActivity`/`ViewController` WebView tweaks (edge-to-edge, keyboard), `isMobileApp()` gating in the client, adding a Capacitor plugin, or the mobile CI/nightly builds. Also load it when reviewing a diff that touches these files, so working iOS-only code is not flagged as dead.