Skip to content
Merged
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
13 changes: 8 additions & 5 deletions build/.tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ tasks:
- ios-sim
cmds:
- cargo run --bin uniffi-bindgen -- generate --library ./target/aarch64-apple-ios/release/libglsdk.a --language swift --out-dir ./target/swift
- xcodebuild -create-xcframework -library target/aarch64-apple-ios-sim/release/libglsdk.a -library target/aarch64-apple-ios/release/libglsdk.a -output target/glsdkFFI.xcframework
- xcodegen generate --spec build/project.yml --project ./libs/gl-sdk-swift
- xcodebuild archive -project libs/gl-sdk-swift/GreenlightBindings.xcodeproj -scheme glsdkFFI -archivePath "./target/ios.xcarchive" -sdk iphoneos -destination "generic/platform=iOS"
- xcodebuild archive -project libs/gl-sdk-swift/GreenlightBindings.xcodeproj -scheme glsdkFFI -archivePath "./target/ios_sim.xcarchive" -sdk iphonesimulator -destination "generic/platform=iOS Simulator"
- xcodebuild -create-xcframework -framework "./target/ios.xcarchive/Products/Library/Frameworks/glsdkFFI.framework" -framework "./target/ios_sim.xcarchive/Products/Library/Frameworks/glsdkFFI.framework" -output "./target/glsdkFFI.xcframework"

linux-*-*:
vars:
Expand All @@ -53,10 +56,10 @@ tasks:
ios-sim:
deps:
- ios-sim-apple-aarch64
# - ios-apple-x86_64
# cmds:
# - mkdir -p target/lipo-ios-sim/release
# - lipo -create target/aarch64-apple-ios-sim/release/libglsdk.a target/x86_64-apple-ios/release/libglsdk.a -output target/lipo-ios-sim/release/libglsdk.a
- ios-apple-x86_64
cmds:
- mkdir -p target/lipo-ios-sim/release
- lipo -create target/aarch64-apple-ios-sim/release/libglsdk.a target/x86_64-apple-ios/release/libglsdk.a -output target/lipo-ios-sim/release/libglsdk.a

ios-apple-*:
vars:
Expand Down
27 changes: 27 additions & 0 deletions build/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: GreenlightBindings
options:
bundleIdPrefix: com.blockstream
targets:
glsdkFFI:
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/glsdkFFI.h"
headerVisibility: public
dependencies:
# Link the library name. Xcode will look in the search paths defined above.
- framework: libglsdk.a
embed: false
Loading