Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/trunk-ios-dev.md
Original file line number Diff line number Diff line change
@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to do the same for android, no? see #11137

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll investigate that one separately (need to get an android phone from someone here first)

1 change: 1 addition & 0 deletions crates/tauri-cli/src/mobile/ios/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down