chore: improve iOS local network permission error message

This commit is contained in:
Lucas Nogueira
2026-01-14 08:34:39 -03:00
parent 1b0e335d3f
commit 05e49099e1

View File

@@ -198,7 +198,8 @@ fn get_response<R: Runtime>(
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()
}