Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
- uses: dtolnay/rust-toolchain@1.85.0
with:
targets: x86_64-apple-ios,aarch64-apple-ios,aarch64-apple-ios-sim,aarch64-apple-darwin
- uses: nightstory/setup-xcodegen@v1
with:
version: 'latest'
- uses: extractions/setup-just@v2
with:
just-version: 1.5.0 # optional semver specification, otherwise latest
Expand Down
8 changes: 4 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ aarch64-apple-ios-sim:
swift: ios ios-sim
# we are not using build-bindings-lib because we need the mac targets anyway
cargo run --features bindings -- generate --library ./target/aarch64-apple-ios/release/liblwk.a --language swift --out-dir ./target/swift
mkdir -p ./target/swift/include
mv target/swift/lwkFFI.h target/swift/include
mv target/swift/lwkFFI.modulemap target/swift/include/module.modulemap
xcodebuild -create-xcframework -library target/lipo-ios-sim/release/liblwk.a -headers target/swift/include -library target/aarch64-apple-ios/release/liblwk.a -headers target/swift/include -output target/lwkFFI.xcframework
xcodegen generate --spec lwk_bindings/swift/project.yml
xcodebuild archive -project lwk_bindings/swift/LwkBindings.xcodeproj -scheme lwkFFI -archivePath "./target/ios.xcarchive" -sdk iphoneos -destination "generic/platform=iOS"
xcodebuild archive -project lwk_bindings/swift/LwkBindings.xcodeproj -scheme lwkFFI -archivePath "./target/ios_sim.xcarchive" -sdk iphonesimulator -destination "generic/platform=iOS Simulator"
xcodebuild -create-xcframework -framework "./target/ios.xcarchive/Products/Library/Frameworks/lwkFFI.framework" -framework "./target/ios_sim.xcarchive/Products/Library/Frameworks/lwkFFI.framework" -output "./target/lwkFFI.xcframework"

csharp-windows: build-bindings-lib
cargo install uniffi-bindgen-cs --git https://github.com/NordSecurity/uniffi-bindgen-cs --tag v0.10.0+v0.29.4
Expand Down
27 changes: 27 additions & 0 deletions lwk_bindings/swift/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: LwkBindings
options:
bundleIdPrefix: com.blockstream
targets:
lwkFFI:
type: framework
platform: iOS
deploymentTarget: "13.0"
settings:
MACH_O_TYPE: staticlib
GENERATE_MASTER_OBJECT_FILE: YES
GENERATE_INFOPLIST_FILE: YES
STRIP_INSTALLED_PRODUCT: NO
BUILD_LIBRARIES_FOR_DISTRIBUTION: YES
SKIP_INSTALL: NO
DEFINES_MODULE: YES
ENABLE_BITCODE: NO
# Conditional paths:
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*]": "../../target/aarch64-apple-ios/release"
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*]": "../../target/lipo-ios-sim/release"
sources:
- path: "../../target/swift/lwkFFI.h"
headerVisibility: public
dependencies:
# Link the library name. Xcode will look in the search paths defined above.
- framework: liblwk.a
embed: false
Loading