From a9587f7de6b4b8075d34fcdd7beb3ffde985be76 Mon Sep 17 00:00:00 2001 From: Artur Guseinov Date: Fri, 31 Mar 2023 18:25:29 +0500 Subject: [PATCH] WalletConnectEcho cocoapods support --- Sources/WalletConnectEcho/Echo.swift | 1 - Sources/WalletConnectEcho/EchoClient.swift | 1 - Sources/WalletConnectEcho/EchoClientFactory.swift | 1 - Sources/WalletConnectEcho/EchoImports.swift | 4 ++++ Sources/WalletConnectEcho/Register/EchoAuthPayload.swift | 1 - Sources/WalletConnectEcho/Register/EchoAuthenticator.swift | 1 - .../WalletConnectEcho/Register/EchoRegisterService.swift | 2 -- Sources/WalletConnectEcho/Register/EchoService.swift | 1 - WalletConnectSwiftV2.podspec | 7 +++++++ 9 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 Sources/WalletConnectEcho/EchoImports.swift diff --git a/Sources/WalletConnectEcho/Echo.swift b/Sources/WalletConnectEcho/Echo.swift index 13f91a4b8..60b9f6e9d 100644 --- a/Sources/WalletConnectEcho/Echo.swift +++ b/Sources/WalletConnectEcho/Echo.swift @@ -1,5 +1,4 @@ import Foundation -import WalletConnectNetworking public class Echo { static public let echoHost = "echo.walletconnect.com" diff --git a/Sources/WalletConnectEcho/EchoClient.swift b/Sources/WalletConnectEcho/EchoClient.swift index ae4801e91..d7724ec5a 100644 --- a/Sources/WalletConnectEcho/EchoClient.swift +++ b/Sources/WalletConnectEcho/EchoClient.swift @@ -1,5 +1,4 @@ import Foundation -import WalletConnectNetworking public class EchoClient: EchoClientProtocol { private let registerService: EchoRegisterService diff --git a/Sources/WalletConnectEcho/EchoClientFactory.swift b/Sources/WalletConnectEcho/EchoClientFactory.swift index 53c0f1081..43bdc82b7 100644 --- a/Sources/WalletConnectEcho/EchoClientFactory.swift +++ b/Sources/WalletConnectEcho/EchoClientFactory.swift @@ -1,5 +1,4 @@ import Foundation -import WalletConnectNetworking public struct EchoClientFactory { public static func create(projectId: String, diff --git a/Sources/WalletConnectEcho/EchoImports.swift b/Sources/WalletConnectEcho/EchoImports.swift new file mode 100644 index 000000000..463cb7c23 --- /dev/null +++ b/Sources/WalletConnectEcho/EchoImports.swift @@ -0,0 +1,4 @@ +#if !CocoaPods +@_exported import WalletConnectNetworking +@_exported import WalletConnectJWT +#endif diff --git a/Sources/WalletConnectEcho/Register/EchoAuthPayload.swift b/Sources/WalletConnectEcho/Register/EchoAuthPayload.swift index dc42a5be2..12b0e26e9 100644 --- a/Sources/WalletConnectEcho/Register/EchoAuthPayload.swift +++ b/Sources/WalletConnectEcho/Register/EchoAuthPayload.swift @@ -1,5 +1,4 @@ import Foundation -import WalletConnectJWT struct EchoAuthPayload: JWTClaimsCodable { diff --git a/Sources/WalletConnectEcho/Register/EchoAuthenticator.swift b/Sources/WalletConnectEcho/Register/EchoAuthenticator.swift index 892ada61b..c47247fa4 100644 --- a/Sources/WalletConnectEcho/Register/EchoAuthenticator.swift +++ b/Sources/WalletConnectEcho/Register/EchoAuthenticator.swift @@ -1,5 +1,4 @@ import Foundation -import WalletConnectNetworking protocol EchoAuthenticating { func createAuthToken() throws -> String diff --git a/Sources/WalletConnectEcho/Register/EchoRegisterService.swift b/Sources/WalletConnectEcho/Register/EchoRegisterService.swift index dcf5588b7..e7e27e68f 100644 --- a/Sources/WalletConnectEcho/Register/EchoRegisterService.swift +++ b/Sources/WalletConnectEcho/Register/EchoRegisterService.swift @@ -1,6 +1,4 @@ import Foundation -import WalletConnectNetworking -import WalletConnectJWT actor EchoRegisterService { private let httpClient: HTTPClient diff --git a/Sources/WalletConnectEcho/Register/EchoService.swift b/Sources/WalletConnectEcho/Register/EchoService.swift index 246f8b086..44c328101 100644 --- a/Sources/WalletConnectEcho/Register/EchoService.swift +++ b/Sources/WalletConnectEcho/Register/EchoService.swift @@ -1,5 +1,4 @@ import Foundation -import WalletConnectNetworking enum EchoAPI: HTTPService { case register(clientId: String, token: String, projectId: String, environment: APNSEnvironment, auth: String) diff --git a/WalletConnectSwiftV2.podspec b/WalletConnectSwiftV2.podspec index a9f746cae..f87cf006f 100644 --- a/WalletConnectSwiftV2.podspec +++ b/WalletConnectSwiftV2.podspec @@ -89,6 +89,7 @@ Pod::Spec.new do |spec| ss.source_files = 'Sources/Web3Wallet/**/*.{h,m,swift}' ss.dependency 'WalletConnectSwiftV2/WalletConnect' ss.dependency 'WalletConnectSwiftV2/WalletConnectAuth' + ss.dependency 'WalletConnectSwiftV2/WalletConnectEcho' end spec.subspec 'WalletConnectChat' do |ss| @@ -108,6 +109,12 @@ Pod::Spec.new do |spec| ss.dependency 'WalletConnectSwiftV2/WalletConnectJWT' end + spec.subspec 'WalletConnectEcho' do |ss| + ss.source_files = 'Sources/WalletConnectEcho/**/*.{h,m,swift}' + ss.dependency 'WalletConnectSwiftV2/WalletConnectNetworking' + ss.dependency 'WalletConnectSwiftV2/WalletConnectJWT' + end + spec.subspec 'WalletConnectJWT' do |ss| ss.source_files = 'Sources/WalletConnectJWT/**/*.{h,m,swift}' ss.dependency 'WalletConnectSwiftV2/WalletConnectKMS'