From bec5c65dcb9eaeff83f93fa789a058011325ef3a Mon Sep 17 00:00:00 2001 From: Ross Savage Date: Tue, 16 Apr 2024 23:08:10 +0200 Subject: [PATCH 1/2] Merge Swift package sources into one BreezSDK target --- libs/sdk-bindings/bindings-swift/Package.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/sdk-bindings/bindings-swift/Package.swift b/libs/sdk-bindings/bindings-swift/Package.swift index 5b13af509..22b7907f9 100644 --- a/libs/sdk-bindings/bindings-swift/Package.swift +++ b/libs/sdk-bindings/bindings-swift/Package.swift @@ -10,12 +10,11 @@ let package = Package( .iOS(.v11), ], products: [ - .library(name: "BreezSDK", targets: ["breez_sdkFFI", "BreezSDK", "BreezSDKNotification"]), + .library(name: "BreezSDK", targets: ["breez_sdkFFI", "BreezSDK"]), ], targets: [ .binaryTarget(name: "breez_sdkFFI", path: "./breez_sdkFFI.xcframework"), - .target(name: "BreezSDK", dependencies: ["breez_sdkFFI"]), - .target(name: "BreezSDKNotification", dependencies: ["BreezSDK"]), + .target(name: "BreezSDK", dependencies: ["breez_sdkFFI"], sources: ["../BreezSDK", "../BreezSDKNotification"]), .testTarget(name: "BreezSDKTests", dependencies: ["BreezSDK"]), ] ) From 49944fddb12b9cd7bb1687ddb39ffae8e89af544 Mon Sep 17 00:00:00 2001 From: Ross Savage Date: Wed, 17 Apr 2024 09:29:47 +0200 Subject: [PATCH 2/2] Move notification source files and change podspecs/package --- libs/sdk-bindings/bindings-swift/.gitignore | 2 +- libs/sdk-bindings/bindings-swift/Package.swift | 2 +- .../BreezSDKConnector.swift | 0 .../{BreezSDKNotification => BreezSDK}/Constants.swift | 0 .../{BreezSDKNotification => BreezSDK}/ResourceHelper.swift | 0 .../SDKNotificationService.swift | 0 .../{BreezSDKNotification => BreezSDK}/ServiceConfig.swift | 0 .../{BreezSDKNotification => BreezSDK}/ServiceLogger.swift | 0 .../{BreezSDKNotification => BreezSDK}/Task/LnurlPay.swift | 0 .../Task/LnurlPayInfo.swift | 0 .../Task/LnurlPayInvoice.swift | 0 .../Task/ReceivePayment.swift | 0 .../{BreezSDKNotification => BreezSDK}/Task/RedeemSwap.swift | 0 .../{BreezSDKNotification => BreezSDK}/TaskProtocol.swift | 0 libs/sdk-flutter/ios/breez_sdk.podspec | 5 ++--- libs/sdk-flutter/ios/breez_sdk.podspec.production | 5 ++--- 16 files changed, 6 insertions(+), 8 deletions(-) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/BreezSDKConnector.swift (100%) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/Constants.swift (100%) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/ResourceHelper.swift (100%) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/SDKNotificationService.swift (100%) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/ServiceConfig.swift (100%) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/ServiceLogger.swift (100%) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/Task/LnurlPay.swift (100%) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/Task/LnurlPayInfo.swift (100%) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/Task/LnurlPayInvoice.swift (100%) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/Task/ReceivePayment.swift (100%) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/Task/RedeemSwap.swift (100%) rename libs/sdk-bindings/bindings-swift/Sources/{BreezSDKNotification => BreezSDK}/TaskProtocol.swift (100%) diff --git a/libs/sdk-bindings/bindings-swift/.gitignore b/libs/sdk-bindings/bindings-swift/.gitignore index a09d6e678..e08da58d5 100644 --- a/libs/sdk-bindings/bindings-swift/.gitignore +++ b/libs/sdk-bindings/bindings-swift/.gitignore @@ -2,7 +2,7 @@ .build/ *.xcodeproj *.podspec -Sources/BreezSDK +Sources/BreezSDK/BreezSDK.swift **/breez_sdkFFI.h **/breez_sdkFFI **/breez_sdkFFI.modulemap diff --git a/libs/sdk-bindings/bindings-swift/Package.swift b/libs/sdk-bindings/bindings-swift/Package.swift index 22b7907f9..fcc941f0b 100644 --- a/libs/sdk-bindings/bindings-swift/Package.swift +++ b/libs/sdk-bindings/bindings-swift/Package.swift @@ -14,7 +14,7 @@ let package = Package( ], targets: [ .binaryTarget(name: "breez_sdkFFI", path: "./breez_sdkFFI.xcframework"), - .target(name: "BreezSDK", dependencies: ["breez_sdkFFI"], sources: ["../BreezSDK", "../BreezSDKNotification"]), + .target(name: "BreezSDK", dependencies: ["breez_sdkFFI"]), .testTarget(name: "BreezSDKTests", dependencies: ["BreezSDK"]), ] ) diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/BreezSDKConnector.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/BreezSDKConnector.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/BreezSDKConnector.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/BreezSDKConnector.swift diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Constants.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Constants.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Constants.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Constants.swift diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/ResourceHelper.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/ResourceHelper.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/ResourceHelper.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/ResourceHelper.swift diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/SDKNotificationService.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/SDKNotificationService.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/SDKNotificationService.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/SDKNotificationService.swift diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/ServiceConfig.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/ServiceConfig.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/ServiceConfig.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/ServiceConfig.swift diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/ServiceLogger.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/ServiceLogger.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/ServiceLogger.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/ServiceLogger.swift diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Task/LnurlPay.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Task/LnurlPay.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Task/LnurlPay.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Task/LnurlPay.swift diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Task/LnurlPayInfo.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Task/LnurlPayInfo.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Task/LnurlPayInfo.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Task/LnurlPayInfo.swift diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Task/LnurlPayInvoice.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Task/LnurlPayInvoice.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Task/LnurlPayInvoice.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Task/LnurlPayInvoice.swift diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Task/ReceivePayment.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Task/ReceivePayment.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Task/ReceivePayment.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Task/ReceivePayment.swift diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Task/RedeemSwap.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Task/RedeemSwap.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/Task/RedeemSwap.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/Task/RedeemSwap.swift diff --git a/libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/TaskProtocol.swift b/libs/sdk-bindings/bindings-swift/Sources/BreezSDK/TaskProtocol.swift similarity index 100% rename from libs/sdk-bindings/bindings-swift/Sources/BreezSDKNotification/TaskProtocol.swift rename to libs/sdk-bindings/bindings-swift/Sources/BreezSDK/TaskProtocol.swift diff --git a/libs/sdk-flutter/ios/breez_sdk.podspec b/libs/sdk-flutter/ios/breez_sdk.podspec index 5d255ea9d..df2e75cd0 100644 --- a/libs/sdk-flutter/ios/breez_sdk.podspec +++ b/libs/sdk-flutter/ios/breez_sdk.podspec @@ -14,9 +14,8 @@ Pod::Spec.new do |s| s.source_files = 'Classes/**/*' s.on_demand_resources = { 'BreezSDK' => [ - 'bindings-swift/Sources/BreezSDK/BreezSDK.swift', - 'bindings-swift/Sources/BreezSDKNotification/*.swift', - 'bindings-swift/Sources/BreezSDKNotification/**/*.swift' + 'bindings-swift/Sources/BreezSDK/*.swift', + 'bindings-swift/Sources/BreezSDK/**/*.swift' ] } s.dependency 'Flutter' diff --git a/libs/sdk-flutter/ios/breez_sdk.podspec.production b/libs/sdk-flutter/ios/breez_sdk.podspec.production index 6d45fe66b..9f465a77c 100644 --- a/libs/sdk-flutter/ios/breez_sdk.podspec.production +++ b/libs/sdk-flutter/ios/breez_sdk.podspec.production @@ -29,9 +29,8 @@ Pod::Spec.new do |s| s.source_files = 'Classes/**/*' s.on_demand_resources = { 'BreezSDK' => [ - 'bindings-swift/Sources/BreezSDK/BreezSDK.swift', - 'bindings-swift/Sources/BreezSDKNotification/*.swift', - 'bindings-swift/Sources/BreezSDKNotification/**/*.swift' + 'bindings-swift/Sources/BreezSDK/*.swift', + 'bindings-swift/Sources/BreezSDK/**/*.swift' ] } s.dependency 'Flutter'