From 32c0229cb707da928e7dbc628030ddddd2fa3175 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Wed, 21 May 2025 11:54:02 -0300 Subject: [PATCH] fix(cli): use platform name to detect iOS architecture to build somehow some user's xcode is sending `--platform iOS Simulator ... arm64` though mine sends `--platform iOS ... Simulator arm64` so the arch detection is broken, i've tweaked it a bit here so it checks the platform argument aswell --- .changes/xcode-script-simulator-detect-fix.md | 6 ++++++ crates/tauri-cli/src/mobile/ios/xcode_script.rs | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changes/xcode-script-simulator-detect-fix.md diff --git a/.changes/xcode-script-simulator-detect-fix.md b/.changes/xcode-script-simulator-detect-fix.md new file mode 100644 index 000000000000..1e1e5c0bf184 --- /dev/null +++ b/.changes/xcode-script-simulator-detect-fix.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:bug +"@tauri-apps/cli": patch:bug +--- + +Fix simulator build detection on Xcode. diff --git a/crates/tauri-cli/src/mobile/ios/xcode_script.rs b/crates/tauri-cli/src/mobile/ios/xcode_script.rs index 37776cb14220..18e00794cb36 100644 --- a/crates/tauri-cli/src/mobile/ios/xcode_script.rs +++ b/crates/tauri-cli/src/mobile/ios/xcode_script.rs @@ -175,7 +175,8 @@ pub fn command(options: Options) -> Result<()> { let isysroot = format!("-isysroot {}", options.sdk_root.display()); - let simulator = options.arches.contains(&"Simulator".to_string()); + let simulator = + options.platform == "iOS Simulator" || options.arches.contains(&"Simulator".to_string()); let arches = if simulator { // when compiling for the simulator, we don't need to build other targets vec![if cfg!(target_arch = "aarch64") {