Skip to content

Commit

Permalink
fix(ios): Don't set macOS deployment target when building for iOS (#1…
Browse files Browse the repository at this point in the history
…1115)

* fix(ios): Don't set macOS deployment target when building for iOS

fixes #11103

* make it look nice :)
  • Loading branch information
FabianLars authored Sep 24, 2024
1 parent 8d381a7 commit 4078923
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions crates/tauri-cli/src/interface/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4078923

Please sign in to comment.