feat(cli): support Trunk for iOS dev out of the box (#11181)

This commit is contained in:
Lucas Fernandes Nogueira
2024-09-30 13:54:13 -03:00
committed by GitHub
parent e10fdb786c
commit 60a5aea53d
2 changed files with 7 additions and 0 deletions

View File

@@ -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.

View File

@@ -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;