From 05e49099e1e35ec44f7ac694e44ccb68744404c8 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Wed, 14 Jan 2026 08:34:39 -0300 Subject: [PATCH] chore: improve iOS local network permission error message --- crates/tauri/src/protocol/tauri.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/tauri/src/protocol/tauri.rs b/crates/tauri/src/protocol/tauri.rs index a346754f0..a39e26f30 100644 --- a/crates/tauri/src/protocol/tauri.rs +++ b/crates/tauri/src/protocol/tauri.rs @@ -198,7 +198,8 @@ fn get_response( if let Some(s) = e.status() { format!("status code: {}", s.as_u16()) } else if cfg!(target_os = "ios") { - ", did you grant local network permissions? That is required to reach the development server. Please grant the permission via the prompt or in `Settings > Privacy & Security > Local Network` and restart the app. See https://support.apple.com/en-us/102229 for more information.".to_string() + let msg = ", did you grant local network permissions? That is required to reach the development server. Please grant the permission via the prompt or in `Settings > Privacy & Security > Local Network` and restart the app. See https://support.apple.com/en-us/102229 for more information."; + format!("{msg}{}", if url.contains("localhost") { " To run on physical devices, use the `--host` option for the `tauri ios dev` command." } else { "" }) } else { "".to_string() }