From 2e1e26240352d2fce70c4f3a3b61bd8717a57986 Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Fri, 15 Nov 2024 10:07:02 +0100 Subject: [PATCH] ffi: fix Swift package Fixes https://github.com/rust-nostr/nostr-sdk-swift/issues/3 Signed-off-by: Yuki Kishimoto --- CHANGELOG.md | 1 + bindings/nostr-sdk-ffi/swift/Package.swift | 1 - .../ios-arm64/Headers/module.modulemap | 4 ---- .../ios-arm64/Modules/module.modulemap | 6 ++++++ .../ios-arm64_x86_64-simulator/Headers/module.modulemap | 4 ---- .../ios-arm64_x86_64-simulator/Modules/module.modulemap | 6 ++++++ .../macos-arm64_x86_64/Headers/module.modulemap | 4 ---- .../macos-arm64_x86_64/Modules/module.modulemap | 6 ++++++ 8 files changed, 19 insertions(+), 13 deletions(-) delete mode 100644 bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64/Headers/module.modulemap create mode 100644 bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64/Modules/module.modulemap delete mode 100644 bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap create mode 100644 bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64_x86_64-simulator/Modules/module.modulemap delete mode 100644 bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/macos-arm64_x86_64/Headers/module.modulemap create mode 100644 bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/macos-arm64_x86_64/Modules/module.modulemap diff --git a/CHANGELOG.md b/CHANGELOG.md index ea34829fb..26b0c1be4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,7 @@ * nostr: fix `TagStandard` de/serialization unit tests ([Yuki Kishimoto]) * pool: fix relay can't manually connect if reconnection is disabled ([Yuki Kishimoto]) +* ffi: fix Swift package ([Yuki Kishimoto]) ### Removed diff --git a/bindings/nostr-sdk-ffi/swift/Package.swift b/bindings/nostr-sdk-ffi/swift/Package.swift index 6402f78c2..82a516386 100644 --- a/bindings/nostr-sdk-ffi/swift/Package.swift +++ b/bindings/nostr-sdk-ffi/swift/Package.swift @@ -12,7 +12,6 @@ let package = Package( products: [ .library(name: "NostrSDK", targets: ["nostr_sdkFFI", "NostrSDK"]), ], - dependencies: [], targets: [ .binaryTarget(name: "nostr_sdkFFI", path: "./nostr_sdkFFI.xcframework"), .target(name: "NostrSDK", dependencies: ["nostr_sdkFFI"]), diff --git a/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64/Headers/module.modulemap b/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64/Headers/module.modulemap deleted file mode 100644 index 8b9cbe6bb..000000000 --- a/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64/Headers/module.modulemap +++ /dev/null @@ -1,4 +0,0 @@ -module nostr_sdkFFI { - header "nostr_sdkFFI.h" - export * -} diff --git a/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64/Modules/module.modulemap b/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64/Modules/module.modulemap new file mode 100644 index 000000000..d6eeb611a --- /dev/null +++ b/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module nostr_sdkFFI { + umbrella header "nostr_sdkFFI-umbrella.h" + + export * + module * { export * } +} diff --git a/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap b/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap deleted file mode 100644 index 8b9cbe6bb..000000000 --- a/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64_x86_64-simulator/Headers/module.modulemap +++ /dev/null @@ -1,4 +0,0 @@ -module nostr_sdkFFI { - header "nostr_sdkFFI.h" - export * -} diff --git a/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64_x86_64-simulator/Modules/module.modulemap b/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64_x86_64-simulator/Modules/module.modulemap new file mode 100644 index 000000000..d6eeb611a --- /dev/null +++ b/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/ios-arm64_x86_64-simulator/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module nostr_sdkFFI { + umbrella header "nostr_sdkFFI-umbrella.h" + + export * + module * { export * } +} diff --git a/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/macos-arm64_x86_64/Headers/module.modulemap b/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/macos-arm64_x86_64/Headers/module.modulemap deleted file mode 100644 index 8b9cbe6bb..000000000 --- a/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/macos-arm64_x86_64/Headers/module.modulemap +++ /dev/null @@ -1,4 +0,0 @@ -module nostr_sdkFFI { - header "nostr_sdkFFI.h" - export * -} diff --git a/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/macos-arm64_x86_64/Modules/module.modulemap b/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/macos-arm64_x86_64/Modules/module.modulemap new file mode 100644 index 000000000..d6eeb611a --- /dev/null +++ b/bindings/nostr-sdk-ffi/swift/nostr_sdkFFI.xcframework/macos-arm64_x86_64/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module nostr_sdkFFI { + umbrella header "nostr_sdkFFI-umbrella.h" + + export * + module * { export * } +}