fix(ios): Tauri iOS build with binary XCFramework dependencies (#13995)

* Fix Tauri iOS build not having a PATH variable to access unzip to extract binaryTargets and also not including Frameworks when linking

* Add covector change

* fmt

* Update crates/tauri-utils/src/build.rs

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
This commit is contained in:
Will
2025-08-18 11:35:49 +01:00
committed by GitHub
parent 37154ebdcd
commit 1a3d1a024e
2 changed files with 10 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri-utils": patch:bug
---
Fix Tauri iOS build with binary XCFramework dependencies, allows extracting binaryTargets that are zipped and also not including XCFrameworks when linking.

View File

@@ -75,6 +75,7 @@ fn link_xcode_library(name: &str, source: impl AsRef<std::path::Path>) {
.arg("OTHER_SWIFT_FLAGS=-no-verify-emitted-module-interface")
.current_dir(source)
.env_clear()
.env("PATH", std::env::var_os("PATH").unwrap_or_default())
.status()
.unwrap();
@@ -85,6 +86,10 @@ fn link_xcode_library(name: &str, source: impl AsRef<std::path::Path>) {
.join("Products")
.join(format!("{configuration}-{sdk}"));
println!(
"cargo::rustc-link-search=framework={}",
lib_out_dir.display()
);
println!("cargo:rerun-if-changed={}", source.display());
println!("cargo:rustc-link-search=native={}", lib_out_dir.display());
println!("cargo:rustc-link-lib=static={name}");