From 5d2f6076810b88c0ce53552b22e43106edba716e Mon Sep 17 00:00:00 2001 From: Pete Watts Date: Thu, 26 Mar 2026 23:46:44 +0000 Subject: [PATCH] Fix using iOS mobile simulator on Intel Mac. (#5268) --- packages/cli/src/build/request.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/build/request.rs b/packages/cli/src/build/request.rs index 9497c581e..195d57898 100644 --- a/packages/cli/src/build/request.rs +++ b/packages/cli/src/build/request.rs @@ -933,7 +933,16 @@ impl BuildRequest { let sysroot_location = match triple.environment { target_lexicon::Environment::Sim => xcode_path .join("Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk"), - _ => xcode_path.join("Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk"), + _ => { + // If the target has been determined as the iOS x86 simulator above + if triple.to_string() == "x86_64-apple-ios" { + xcode_path.join( + "Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk", + ) + } else { + xcode_path.join("Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk") + } + } }; if sysroot_location.exists() && !rustflags.flags.iter().any(|f| f == "-isysroot") {