From a6ce32a18b81b04ce7e897d1d98df6eb2da04786 Mon Sep 17 00:00:00 2001 From: Gus Cairo Date: Wed, 12 Mar 2025 22:03:06 +0000 Subject: [PATCH] Fix availability mismatches (#339) https://github.com/apple/swift-crypto/issues/338 pointed to some availability guard platform mismatches on `ARC` and its extensions. This PR aims to fix these and make sure all platforms build correctly. --- Sources/_CryptoExtras/ARC/ARCEncoding.swift | 2 +- Sources/crypto-shasum/main.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/_CryptoExtras/ARC/ARCEncoding.swift b/Sources/_CryptoExtras/ARC/ARCEncoding.swift index 526b6fec..13f5690d 100644 --- a/Sources/_CryptoExtras/ARC/ARCEncoding.swift +++ b/Sources/_CryptoExtras/ARC/ARCEncoding.swift @@ -238,7 +238,7 @@ extension ARC.Credential where H2G == ARCH2G { // Serialize a ARC PresentationState, to help save and restore a credential. // This will only be called client-side, and never be sent over the wire. -@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) +@available(macOS 10.15, iOS 13.2, tvOS 13.2, watchOS 6.1, *) extension ARC.PresentationState { func serialize() throws -> Data { let encoder = PropertyListEncoder() diff --git a/Sources/crypto-shasum/main.swift b/Sources/crypto-shasum/main.swift index 05c7561d..9475bb66 100644 --- a/Sources/crypto-shasum/main.swift +++ b/Sources/crypto-shasum/main.swift @@ -149,7 +149,7 @@ func main() { } -if #available(macOS 10.15, *) { +if #available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) { main() } else { fatalError("crypto-shasum can only be run on macOS 10.15 and later")