From 63bfcba7fdcd89f2ddb5adf638a5a7666958db64 Mon Sep 17 00:00:00 2001 From: thunderbiscuit Date: Wed, 12 Jun 2024 10:18:26 -0400 Subject: [PATCH] temp 4: fix the swift package --- bdk-swift/bdkFFI.xcframework/Info.plist | 34 +++++++++++-------- .../ios-arm64/Headers/module.modulemap | 7 ++++ .../ios-arm64/bdkFFI.framework/Info.plist | 18 ---------- .../Headers/module.modulemap | 7 ++++ .../Headers/module.modulemap | 7 ++++ bdk-swift/build-local-swift.sh | 9 ++--- bdk-swift/justfile | 2 +- 7 files changed, 47 insertions(+), 37 deletions(-) delete mode 100644 bdk-swift/bdkFFI.xcframework/ios-arm64/bdkFFI.framework/Info.plist diff --git a/bdk-swift/bdkFFI.xcframework/Info.plist b/bdk-swift/bdkFFI.xcframework/Info.plist index 89fa6042..98641cc0 100644 --- a/bdk-swift/bdkFFI.xcframework/Info.plist +++ b/bdk-swift/bdkFFI.xcframework/Info.plist @@ -5,10 +5,14 @@ AvailableLibraries + BinaryPath + libbdkffi.a + HeadersPath + Headers LibraryIdentifier macos-arm64_x86_64 LibraryPath - bdkFFI.framework + libbdkffi.a SupportedArchitectures arm64 @@ -16,39 +20,41 @@ SupportedPlatform macos - LSMinimumSystemVersion - 12.0 + BinaryPath + libbdkffi.a + HeadersPath + Headers LibraryIdentifier - ios-arm64_x86_64-simulator + ios-arm64 LibraryPath - bdkFFI.framework + libbdkffi.a SupportedArchitectures arm64 - x86_64 SupportedPlatform ios - SupportedPlatformVariant - simulator - MinimumOSVersion - 15.0 + BinaryPath + libbdkffi.a + HeadersPath + Headers LibraryIdentifier - ios-arm64 + ios-arm64_x86_64-simulator LibraryPath - bdkFFI.framework + libbdkffi.a SupportedArchitectures arm64 + x86_64 SupportedPlatform ios - MinimumOSVersion - 15.0 + SupportedPlatformVariant + simulator CFBundlePackageType diff --git a/bdk-swift/bdkFFI.xcframework/ios-arm64/Headers/module.modulemap b/bdk-swift/bdkFFI.xcframework/ios-arm64/Headers/module.modulemap index 8236b7e1..578ca939 100644 --- a/bdk-swift/bdkFFI.xcframework/ios-arm64/Headers/module.modulemap +++ b/bdk-swift/bdkFFI.xcframework/ios-arm64/Headers/module.modulemap @@ -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 * } \ No newline at end of file diff --git a/bdk-swift/bdkFFI.xcframework/ios-arm64/bdkFFI.framework/Info.plist b/bdk-swift/bdkFFI.xcframework/ios-arm64/bdkFFI.framework/Info.plist deleted file mode 100644 index 71b8db90..00000000 --- a/bdk-swift/bdkFFI.xcframework/ios-arm64/bdkFFI.framework/Info.plist +++ /dev/null @@ -1,18 +0,0 @@ - - - - - CFBundleIdentifier - com.bitcoindevkit.bdkFFI - CFBundleName - bdkFFI - CFBundleVersion - 1.0.0 - CFBundleShortVersionString - 1.0.0 - CFBundleExecutable - bdkFFI - MinimumOSVersion - 100 - - \ No newline at end of file diff --git a/bdk-swift/bdkFFI.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap b/bdk-swift/bdkFFI.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap index 8236b7e1..578ca939 100644 --- a/bdk-swift/bdkFFI.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap +++ b/bdk-swift/bdkFFI.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap @@ -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 * } \ No newline at end of file diff --git a/bdk-swift/bdkFFI.xcframework/macos-arm64_x86_64/Headers/module.modulemap b/bdk-swift/bdkFFI.xcframework/macos-arm64_x86_64/Headers/module.modulemap index 8236b7e1..578ca939 100644 --- a/bdk-swift/bdkFFI.xcframework/macos-arm64_x86_64/Headers/module.modulemap +++ b/bdk-swift/bdkFFI.xcframework/macos-arm64_x86_64/Headers/module.modulemap @@ -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 * } \ No newline at end of file diff --git a/bdk-swift/build-local-swift.sh b/bdk-swift/build-local-swift.sh index bcc30633..0c4ab353 100755 --- a/bdk-swift/build-local-swift.sh +++ b/bdk-swift/build-local-swift.sh @@ -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" @@ -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" diff --git a/bdk-swift/justfile b/bdk-swift/justfile index 8f007073..961d9723 100644 --- a/bdk-swift/justfile +++ b/bdk-swift/justfile @@ -11,4 +11,4 @@ test: swift test test-offline: - swift test --skip LiveWalletTests --skip LiveTxBuilderTests \ No newline at end of file + swift test --skip LiveElectrumClientTests --skip LiveMemoryWalletTests --skip LiveTransactionTests --skip LiveTxBuilderTests --skip LiveWalletTests