File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,4 @@ ci/LDKSwift/.swiftpm
20
20
xcode /LDK /* .h
21
21
xcode /LDK /* .c
22
22
xcuserdata /
23
+ /xcode /LDK /build
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+ set -e # abort if any command fails
3
+
4
+ BIN_OUTPUT_DIRECTORY=" ` pwd` /build"
5
+
6
+ rm -rf $BIN_OUTPUT_DIRECTORY
7
+
8
+ xcodebuild archive -scheme LDKFramework \
9
+ -destination " generic/platform=iOS Simulator" \
10
+ -archivePath ${BIN_OUTPUT_DIRECTORY} /LDKFramework-Sim \
11
+ SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
12
+
13
+ xcodebuild archive -scheme LDKFramework \
14
+ -destination " generic/platform=iOS" \
15
+ -archivePath ${BIN_OUTPUT_DIRECTORY} /LDKFramework-iOS \
16
+ SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
17
+
18
+ xcodebuild -create-xcframework \
19
+ -framework ${BIN_OUTPUT_DIRECTORY} /LDKFramework-iOS.xcarchive/Products/Library/Frameworks/LDKFramework.framework \
20
+ -framework ${BIN_OUTPUT_DIRECTORY} /LDKFramework-Sim.xcarchive/Products/Library/Frameworks/LDKFramework.framework \
21
+ -output ${BIN_OUTPUT_DIRECTORY} /LDKFramework.xcframework
Original file line number Diff line number Diff line change @@ -28,8 +28,6 @@ if [[ ${ACTION:-build} = "build" || $ACTION = "install" ]]; then
28
28
29
29
if [[ $PLATFORM_NAME = " macosx" ]]; then
30
30
RUST_TARGET_OS=" darwin"
31
- elif [[ $PLATFORM_NAME = " iphonesimulator" ]]; then
32
- RUST_TARGET_OS=" ios-sim"
33
31
else
34
32
RUST_TARGET_OS=" ios"
35
33
fi
@@ -62,6 +60,12 @@ if [[ ${ACTION:-build} = "build" || $ACTION = "install" ]]; then
62
60
RUST_ARCH=$ARCH
63
61
if [[ $RUST_ARCH = " arm64" ]]; then
64
62
RUST_ARCH=" aarch64"
63
+ # This is because iOS Simulator builds for x86_64 is `x86_64-apple-ios`, while arm64 is `aarch64-apple-ios-sim`
64
+ if [[ $PLATFORM_NAME = " iphonesimulator" ]]; then
65
+ RUST_TARGET_OS=" ios-sim"
66
+ fi
67
+ else
68
+ RUST_TARGET_OS=" ios"
65
69
fi
66
70
67
71
cargo build -Z build-std=panic_abort,std --features " std" --target " ${RUST_ARCH} -apple-${RUST_TARGET_OS} " $RUST_CONFIGURATION_FLAG
You can’t perform that action at this time.
0 commit comments