Skip to content

Commit

Permalink
temp 4: fix the swift package
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Jun 12, 2024
1 parent 2074ad7 commit 63bfcba
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 37 deletions.
34 changes: 20 additions & 14 deletions bdk-swift/bdkFFI.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,56 @@
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>libbdkffi.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>bdkFFI.framework</string>
<string>libbdkffi.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
<key>LSMinimumSystemVersion</key>
<string>12.0</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>libbdkffi.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>bdkFFI.framework</string>
<string>libbdkffi.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
<key>MinimumOSVersion</key>
<string>15.0</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>libbdkffi.a</string>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>bdkFFI.framework</string>
<string>libbdkffi.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>MinimumOSVersion</key>
<string>15.0</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@
module BitcoinDevKitFFI {
header "BitcoinDevKitFFI.h"
export *
}

// This file was autogenerated by some hot garbage in the `uniffi` crate.
// Trust me, you don't want to mess with it!
module BitcoinFFI {
header "BitcoinFFI.h"
export *
}
18 changes: 0 additions & 18 deletions bdk-swift/bdkFFI.xcframework/ios-arm64/bdkFFI.framework/Info.plist

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@
module BitcoinDevKitFFI {
header "BitcoinDevKitFFI.h"
export *
}

// This file was autogenerated by some hot garbage in the `uniffi` crate.
// Trust me, you don't want to mess with it!
module BitcoinFFI {
header "BitcoinFFI.h"
export *
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@
module BitcoinDevKitFFI {
header "BitcoinDevKitFFI.h"
export *
}

// This file was autogenerated by some hot garbage in the `uniffi` crate.
// Trust me, you don't want to mess with it!
module BitcoinFFI {
header "BitcoinFFI.h"
export *
}
9 changes: 5 additions & 4 deletions bdk-swift/build-local-swift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

HEADERPATH="Sources/BitcoinDevKit/BitcoinDevKitFFI.h"
MODMAPPATH="Sources/BitcoinDevKit/BitcoinDevKitFFI.modulemap"
HEADERPATH1="Sources/BitcoinDevKit/BitcoinFFI.h"
MODMAPPATH1="Sources/BitcoinDevKit/BitcoinFFI.modulemap"
HEADERPATH_BITCOIN_FFI="Sources/BitcoinDevKit/BitcoinFFI.h"
MODMAPPATH_BITCOIN_FFI="Sources/BitcoinDevKit/BitcoinFFI.modulemap"
TARGETDIR="../bdk-ffi/target"
OUTDIR="."
RELDIR="release-smaller"
Expand Down Expand Up @@ -46,9 +46,10 @@ cd ../bdk-swift/ || exit
# move bdk-ffi static lib header files to temporary directory
mkdir -p "${NEW_HEADER_DIR}"
mv "${HEADERPATH}" "${NEW_HEADER_DIR}"
mv "${HEADERPATH1}" "${NEW_HEADER_DIR}"
mv "${HEADERPATH_BITCOIN_FFI}" "${NEW_HEADER_DIR}"
mv "${MODMAPPATH}" "${NEW_HEADER_DIR}/module.modulemap"
mv "${MODMAPPATH1}" "${NEW_HEADER_DIR}"
echo -e "\n" >> "${NEW_HEADER_DIR}/module.modulemap"
cat "${MODMAPPATH_BITCOIN_FFI}" >> "${NEW_HEADER_DIR}/module.modulemap"

# remove old xcframework directory
rm -rf "${OUTDIR}/${NAME}.xcframework"
Expand Down
2 changes: 1 addition & 1 deletion bdk-swift/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ test:
swift test

test-offline:
swift test --skip LiveWalletTests --skip LiveTxBuilderTests
swift test --skip LiveElectrumClientTests --skip LiveMemoryWalletTests --skip LiveTransactionTests --skip LiveTxBuilderTests --skip LiveWalletTests

0 comments on commit 63bfcba

Please sign in to comment.