Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bindings): use the same library name for all platforms in the xcframework #3536

Merged
Merged
Changes from all commits
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
17 changes: 10 additions & 7 deletions xtask/src/swift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ impl Platform {
}
}

/// The name of the library for the platform once all architectures are
/// lipo'd together.
fn lib_name(&self) -> &str {
/// The name of the subfolder in which to place the library for the platform
/// once all architectures are lipo'd together.
fn lib_folder_name(&self) -> &str {
match self {
Platform::Macos => "libmatrix_sdk_ffi_macos.a",
Platform::Ios => "libmatrix_sdk_ffi_ios.a",
Platform::IosSimulator => "libmatrix_sdk_ffi_iossimulator.a",
Platform::Macos => "macos",
Platform::Ios => "ios",
Platform::IosSimulator => "ios-simulator",
}
}
}
Expand Down Expand Up @@ -321,7 +321,10 @@ fn lipo_platform_libraries(
continue;
}

let output_path = generated_dir.join(platform.lib_name());
let output_folder = generated_dir.join("lipo").join(platform.lib_folder_name());
create_dir_all(&output_folder)?;

let output_path = output_folder.join(FFI_LIBRARY_NAME);
let mut cmd = cmd!("lipo -create");
for path in paths {
cmd = cmd.arg(path);
Expand Down
Loading