Skip to content

Commit b88e22a

Browse files
authored
fix(cli): set ios deployment target only when building for ios (#11063)
1 parent 40a45b5 commit b88e22a

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'tauri-cli': 'patch:bug'
3+
'@tauri-apps/cli': 'patch:bug'
4+
---
5+
6+
The cli now only sets the iOS deployment target environment variable when building for iOS.

crates/tauri-cli/src/interface/rust.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,14 @@ impl Interface for Rust {
151151
std::env::set_var("MACOSX_DEPLOYMENT_TARGET", minimum_system_version);
152152
}
153153

154-
std::env::set_var(
155-
"IPHONEOS_DEPLOYMENT_TARGET",
156-
&config.bundle.ios.minimum_system_version,
157-
);
154+
if let Some(target) = &target {
155+
if target.ends_with("ios") || target.ends_with("ios-sim") {
156+
std::env::set_var(
157+
"IPHONEOS_DEPLOYMENT_TARGET",
158+
&config.bundle.ios.minimum_system_version,
159+
);
160+
}
161+
}
158162

159163
let app_settings = RustAppSettings::new(config, manifest, target)?;
160164

0 commit comments

Comments
 (0)