Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1573,8 +1573,10 @@ impl Build {
if let Some(arch) =
map_darwin_target_from_rust_to_compiler_architecture(target)
{
let deployment_target = env::var("IPHONEOS_DEPLOYMENT_TARGET")
Copy link
Author

@imWildCat imWildCat May 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether it is a good way. But as an iOS developer, I believe it makes sense. Because in Xcode, Mac Catalyst minimal version is highly related to minimal iOS version. For example, if I choose iOS 14.0, I can only pick macOS 11+ for this situation:

image

image

.unwrap_or_else(|_| "13.0".into());
cmd.args
.push(format!("--target={}-apple-ios13.0-macabi", arch).into());
.push(format!("--target={}-apple-ios{}-macabi", arch, deployment_target).into());
}
} else if target.contains("ios-sim") {
if let Some(arch) =
Expand Down