From d7191121ceaa105c217729aac60df14197b7bd1f Mon Sep 17 00:00:00 2001 From: brennobemoura <37243584+brennobemoura@users.noreply.github.com> Date: Sun, 4 Oct 2026 08:23:20 -0300 Subject: [PATCH] Mark the Network TLS version conversion as available from macOS 10.15 tls_protocol_version_t is only available in macOS 10.15, iOS 13, tvOS 13 and watchOS 6. The package declares no minimum platforms, so the unannotated TLSVersion.init?(_:) failed to compile for deployment targets below those. Its only call site is already guarded by the same availability check. Co-Authored-By: Claude Sonnet 5.5 --- .../ConnectionPool/HTTPConnectionSetupRecorder.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/AsyncHTTPClient/ConnectionPool/HTTPConnectionSetupRecorder.swift b/Sources/AsyncHTTPClient/ConnectionPool/HTTPConnectionSetupRecorder.swift index 8cb676dae..fdab57af4 100644 --- a/Sources/AsyncHTTPClient/ConnectionPool/HTTPConnectionSetupRecorder.swift +++ b/Sources/AsyncHTTPClient/ConnectionPool/HTTPConnectionSetupRecorder.swift @@ -168,6 +168,7 @@ final class HTTPConnectionSetupRecorder: Sendable { #if canImport(Network) extension TLSVersion { /// The version the Network framework negotiated, or `nil` for a version that has no equivalent, like DTLS. + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) init?(_ version: tls_protocol_version_t) { switch version { case .TLSv10: