From 6ce57e9ac4ecb1339300e892f126b0cd0b04c49e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juliano=20C=C3=A9zar=20Chagas=20Tavares?= Date: Tue, 8 Oct 2024 15:21:03 -0300 Subject: [PATCH] Expose public OID4VCI HTTP clients initializers (#40) This exposes the Oid4vciSyncHttpClient and Oid4vciAsyncHttpClient initializers that allow creation on the apps. --- Package.swift | 2 +- Sources/MobileSdk/OID4VCI.swift | 4 ++++ SpruceIDMobileSdk.podspec | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Package.swift b/Package.swift index 8ebcc96..8df191e 100644 --- a/Package.swift +++ b/Package.swift @@ -14,7 +14,7 @@ let package = Package( targets: ["SpruceIDMobileSdk"]) ], dependencies: [ - .package(url: "https://github.com/spruceid/mobile-sdk-rs.git", exact: "0.0.33"), + .package(url: "https://github.com/spruceid/mobile-sdk-rs.git", exact: "0.0.36"), // .package(path: "../mobile-sdk-rs"), .package(url: "https://github.com/apple/swift-algorithms", from: "1.2.0") ], diff --git a/Sources/MobileSdk/OID4VCI.swift b/Sources/MobileSdk/OID4VCI.swift index ef06ab0..23e9a23 100644 --- a/Sources/MobileSdk/OID4VCI.swift +++ b/Sources/MobileSdk/OID4VCI.swift @@ -3,6 +3,8 @@ import Foundation import SpruceIDMobileSdkRs public class Oid4vciSyncHttpClient: SyncHttpClient { + public init() {} + public func httpClient(request: HttpRequest) throws -> HttpResponse { guard let url = URL(string: request.url) else { throw HttpClientError.Other(error: "failed to construct URL") @@ -74,6 +76,8 @@ public class Oid4vciSyncHttpClient: SyncHttpClient { } public class Oid4vciAsyncHttpClient: AsyncHttpClient { + public init() {} + public func httpClient(request: HttpRequest) async throws -> HttpResponse { guard let url = URL(string: request.url) else { throw HttpClientError.Other(error: "failed to construct URL") diff --git a/SpruceIDMobileSdk.podspec b/SpruceIDMobileSdk.podspec index 9309516..041ba1f 100644 --- a/SpruceIDMobileSdk.podspec +++ b/SpruceIDMobileSdk.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "SpruceIDMobileSdk" - spec.version = "0.0.11" + spec.version = "0.0.12" spec.summary = "Swift Mobile SDK." spec.description = <<-DESC SpruceID Swift Mobile SDK. @@ -20,7 +20,7 @@ Pod::Spec.new do |spec| spec.source_files = "Sources/MobileSdk/*.swift" spec.static_framework = true - spec.dependency 'SpruceIDMobileSdkRs', "~> 0.0.33" + spec.dependency 'SpruceIDMobileSdkRs', "~> 0.0.36" spec.dependency 'SwiftAlgorithms', "~> 1.0.0" spec.frameworks = 'Foundation', 'CoreBluetooth', 'CryptoKit' end