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

Use static libs for the iOS Swift framework #236

Merged
merged 1 commit into from
Sep 15, 2023
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
10 changes: 5 additions & 5 deletions languages/swift/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ cargo build --package bitwarden-uniffi --target aarch64-apple-ios --release
cargo build --package bitwarden-uniffi --target x86_64-apple-ios --release

# Create universal libraries
lipo -create ../../target/aarch64-apple-ios-sim/release/libbitwarden_uniffi.dylib \
../../target/x86_64-apple-ios/release/libbitwarden_uniffi.dylib \
-output ./tmp/target/universal-ios-sim/release/libbitwarden_uniffi.dylib
lipo -create ../../target/aarch64-apple-ios-sim/release/libbitwarden_uniffi.a \
../../target/x86_64-apple-ios/release/libbitwarden_uniffi.a \
-output ./tmp/target/universal-ios-sim/release/libbitwarden_uniffi.a

# Generate swift bindings
cargo run -p uniffi-bindgen generate \
Expand All @@ -39,9 +39,9 @@ cat ./tmp/bindings/BitwardenFFI.modulemap ./tmp/bindings/BitwardenCoreFFI.module

# Build xcframework
xcodebuild -create-xcframework \
-library ../../target/aarch64-apple-ios/release/libbitwarden_uniffi.dylib \
-library ../../target/aarch64-apple-ios/release/libbitwarden_uniffi.a \
-headers ./tmp/Headers \
-library ./tmp/target/universal-ios-sim/release/libbitwarden_uniffi.dylib \
-library ./tmp/target/universal-ios-sim/release/libbitwarden_uniffi.a \
-headers ./tmp/Headers \
-output ./BitwardenFFI.xcframework

Expand Down