mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-11-06 00:15:06 +00:00
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:
Generated
+1
@@ -5487,6 +5487,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"iroh",
|
||||
"rustls",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
|
||||
@@ -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 = [] }
|
||||
|
||||
@@ -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()?;
|
||||
|
||||
@@ -31,6 +31,11 @@
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
]
|
||||
],
|
||||
"iOS": {
|
||||
"frameworks": [
|
||||
"SystemConfiguration"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user