From 4078923f6b501f34eb880da014793bef533d5999 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Tue, 24 Sep 2024 15:51:36 +0200 Subject: [PATCH] fix(ios): Don't set macOS deployment target when building for iOS (#11115) * fix(ios): Don't set macOS deployment target when building for iOS fixes #11103 * make it look nice :) --- crates/tauri-cli/src/interface/rust.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/crates/tauri-cli/src/interface/rust.rs b/crates/tauri-cli/src/interface/rust.rs index d2ffc68c7..3c7341db6 100644 --- a/crates/tauri-cli/src/interface/rust.rs +++ b/crates/tauri-cli/src/interface/rust.rs @@ -147,19 +147,18 @@ impl Interface for Rust { manifest }; - if let Some(minimum_system_version) = &config.bundle.macos.minimum_system_version { + let target_ios = target.as_ref().map_or(false, |target| { + target.ends_with("ios") || target.ends_with("ios-sim") + }); + if target_ios { + std::env::set_var( + "IPHONEOS_DEPLOYMENT_TARGET", + &config.bundle.ios.minimum_system_version, + ); + } else if let Some(minimum_system_version) = &config.bundle.macos.minimum_system_version { std::env::set_var("MACOSX_DEPLOYMENT_TARGET", minimum_system_version); } - if let Some(target) = &target { - if target.ends_with("ios") || target.ends_with("ios-sim") { - std::env::set_var( - "IPHONEOS_DEPLOYMENT_TARGET", - &config.bundle.ios.minimum_system_version, - ); - } - } - let app_settings = RustAppSettings::new(config, manifest, target)?; Ok(Self {