mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-11-06 08:15:35 +00:00
* feat(mobile): run on Android The app builds and runs on Android, and fits there. - Back button and gesture close what is open over the screen, then go back a screen, and from the first one send the app to the background. Left to the WebView they closed the app, since it has no history. - The system bars: the page asks their size of the app (`insets`, over JNI), since WebViews before 140 report the safe areas as 0 even edge to edge. The CSS reads them as `--inset-*`, which iOS still fills from `env()`. - The keyboard: edge to edge, the WebView is not resized for it and its visual viewport stays whole, so the keyboard covered the message box. MainActivity hands its height to the page, which lays out as on iOS. - The title folds into the bar from the scroll position on every screen. The observer it used reported a title in plain view as out of sight on Android, so the bar started folded. - src-tauri/gen/android is kept in the repo for that MainActivity. * ci(mobile): release a signed Android APK A `mobile-v<x.y.z>` tag builds the app for arm64 at that version, signs it with the release key and attaches it to a draft release. The mobile app is versioned apart from the desktop's `v*` tags. - The release is never marked latest: the desktop updater reads /releases/latest and would take it for a desktop release. - The APK's certificate is checked against the release key's, since one signed with another key could not be installed over earlier ones. - The NDK is pinned, and the version must be x.y.z: Tauri derives the versionCode from it, and Android installs over a build only when that is higher. - Gradle signs a release build when keystore.properties names a key; CI writes it from secrets. - The release library is stripped: 30 MB to 20, the APK 32 to 23. * ci: tell people how to install the phone app The nightly release notes and each mobile-v release now say how to get the app on a phone: the TestFlight link for iPhone, and the newest mobile-v release's APK for Android. Both read .github/mobile-install.md.
54 lines
1.8 KiB
TOML
54 lines
1.8 KiB
TOML
[package]
|
|
name = "tty7-mobile"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
description = "tty7 on a phone: watch and drive your desktop's panes and agents from anywhere"
|
|
license = "Apache-2.0"
|
|
publish = false
|
|
|
|
# Its own workspace, not a member of the root one: Tauri pulls in a WebView
|
|
# stack (webkit2gtk on Linux) that the desktop build and its CI have no reason
|
|
# to compile. It shares the protocol and client crates by path, so the wire
|
|
# format still has exactly one definition.
|
|
[workspace]
|
|
|
|
[lib]
|
|
# `staticlib` for iOS, `cdylib` for Android, `rlib` for the desktop dev build.
|
|
name = "tty7_mobile_lib"
|
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
|
|
[dependencies]
|
|
tty7-mobile-client = { path = "../../crates/tty7-mobile-client" }
|
|
tty7-mobile-proto = { path = "../../crates/tty7-mobile-proto" }
|
|
|
|
anyhow = "1"
|
|
iroh = "1.2"
|
|
rustls = { version = "0.23", default-features = false, features = ["ring"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
tauri = { version = "2", features = [] }
|
|
tokio = { version = "1", features = ["sync", "time", "macros"] }
|
|
tauri-plugin-opener = "2"
|
|
|
|
[target.'cfg(any(target_os = "android", target_os = "ios"))'.dependencies]
|
|
tauri-plugin-barcode-scanner = "2"
|
|
# Face ID / passcode before the app shows anything, when turned on.
|
|
tauri-plugin-biometric = "2"
|
|
|
|
# Reading the system bars' size and leaving for the background (`insets`,
|
|
# `to_background`), which the Tauri API does not reach.
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
jni = "0.21"
|
|
|
|
# Setting one WKWebView property the Tauri API does not reach (`edge_to_edge`).
|
|
[target.'cfg(target_os = "ios")'.dependencies]
|
|
objc2 = "0.6"
|
|
|
|
# The Android library ships as built: stripping takes it from 30 MB to 20, and
|
|
# the APK from 32 to 23. iOS strips at export either way.
|
|
[profile.release]
|
|
strip = true
|