Przeglądaj źródła

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

Lucas Fernandes Nogueira 10 miesięcy temu
rodzic
commit
60a5aea53d

+ 6 - 0
.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.

+ 1 - 0
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;