diff --git a/.changes/trunk-ios-dev.md b/.changes/trunk-ios-dev.md new file mode 100644 index 000000000..4f884190c --- /dev/null +++ b/.changes/trunk-ios-dev.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:enhance +"@tauri-apps/cli": patch:enhance +--- + +Set the `TRUNK_SERVE_ADDRESS` environment variable when running on iOS physical devices to support Trunk. diff --git a/crates/tauri-cli/src/mobile/ios/dev.rs b/crates/tauri-cli/src/mobile/ios/dev.rs index d4347464b..bc0b0381f 100644 --- a/crates/tauri-cli/src/mobile/ios/dev.rs +++ b/crates/tauri-cli/src/mobile/ios/dev.rs @@ -344,6 +344,7 @@ fn use_network_address_for_dev_url( if let Some(ip) = ip { std::env::set_var("TAURI_DEV_HOST", ip.to_string()); + std::env::set_var("TRUNK_SERVE_ADDRESS", ip.to_string()); if ip.is_ipv6() { // in this case we can't ping the server for some reason dev_options.no_dev_server_wait = true;