fix(mobile): link SystemConfiguration and install a rustls provider on iOS

The first iOS build failed to link: netdev and system-configuration, pulled
in by iroh, need SystemConfiguration.framework, which the generated Xcode
project does not list. bundle.iOS.frameworks adds it on `tauri ios init`.

Once linked, the app panicked at launch: iroh builds its reqwest client with
`rustls-no-provider`, so a process-wide crypto provider must be installed
before any client is built. Install ring's, which is already in the tree.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
l0ng-ai
2026-09-28 16:40:21 +08:00
co-authored by Claude
parent 26d09d64c7
commit e7a8fdf605
4 changed files with 13 additions and 1 deletions
+1
View File
@@ -5487,6 +5487,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"iroh",
"rustls",
"serde",
"serde_json",
"tauri",
+1
View File
@@ -26,6 +26,7 @@ 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 = [] }
+5
View File
@@ -392,6 +392,11 @@ async fn pane_close(state: State<'_, Arc<AppState>>, handle: u32) -> CmdResult<(
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
// iroh builds its reqwest client with `rustls-no-provider`, which panics
// unless a process-wide provider is installed first. `ring` is the one
// already in the tree. An `Err` means one is installed, which is fine.
let _ = rustls::crypto::ring::default_provider().install_default();
tauri::Builder::default()
.setup(|app| {
let dir = app.path().app_data_dir()?;
+6 -1
View File
@@ -31,6 +31,11 @@
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
],
"iOS": {
"frameworks": [
"SystemConfiguration"
]
}
}
}