fix: iOS dev on macOS with Intel chip regression (#448)

use the proper x86_64 simulator arch
This commit is contained in:
Lucas Fernandes Nogueira
2025-04-11 19:31:14 -03:00
committed by GitHub
parent db6c642269
commit 44a5dd6f90
2 changed files with 11 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"cargo-mobile2": patch
---
Fix regression on development on macOS with Intel chip.

View File

@@ -467,7 +467,12 @@ impl Exec for Input {
let simulator = arches.contains(&"Simulator".to_string());
let arches = if simulator {
// when compiling for the simulator, we don't need to build other targets
vec!["arm64".to_string()]
vec![if cfg!(target_arch = "aarch64") {
"arm64"
} else {
"x86_64"
}
.to_string()]
} else {
arches
};