Skip to content

Commit

Permalink
fix(cli): set ios deployment target only when building for ios (#11063)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars authored Sep 20, 2024
1 parent 40a45b5 commit b88e22a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changes/fix-conditional-ios-deployment-target.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'tauri-cli': 'patch:bug'
'@tauri-apps/cli': 'patch:bug'
---

The cli now only sets the iOS deployment target environment variable when building for iOS.
12 changes: 8 additions & 4 deletions crates/tauri-cli/src/interface/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,14 @@ impl Interface for Rust {
std::env::set_var("MACOSX_DEPLOYMENT_TARGET", minimum_system_version);
}

std::env::set_var(
"IPHONEOS_DEPLOYMENT_TARGET",
&config.bundle.ios.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)?;

Expand Down

0 comments on commit b88e22a

Please sign in to comment.