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 :)
This commit is contained in:
Fabian-Lars 2024-09-24 15:51:36 +02:00 committed by GitHub
parent 8d381a71e8
commit 4078923f6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {