From b3f59fa1ed337930a723fa602a4170949538fb15 Mon Sep 17 00:00:00 2001 From: Matthew Mathias Date: Wed, 24 Jan 2024 16:40:43 -0800 Subject: [PATCH] Update KeychainAttribute.swift to check availability for iOS, tvOS, and watchOS as well --- GTMAppAuth/Sources/KeychainStore/KeychainAttribute.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GTMAppAuth/Sources/KeychainStore/KeychainAttribute.swift b/GTMAppAuth/Sources/KeychainStore/KeychainAttribute.swift index 81a41f3..b13b5f9 100644 --- a/GTMAppAuth/Sources/KeychainStore/KeychainAttribute.swift +++ b/GTMAppAuth/Sources/KeychainStore/KeychainAttribute.swift @@ -24,7 +24,7 @@ public final class KeychainAttribute: NSObject { /// Indicates whether to treat macOS keychain items like iOS keychain items. /// /// This attribute will set `kSecUseDataProtectionKeychain` as true in the Keychain query. - @available(macOS 10.15, *) + @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) case useDataProtectionKeychain /// The `String` name for the access group to use in the Keychain query. case accessGroup(String) @@ -33,7 +33,7 @@ public final class KeychainAttribute: NSObject { public var keyName: String { switch self { case .useDataProtectionKeychain: - if #available(macOS 10.15, *) { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) { return kSecUseDataProtectionKeychain as String } else { fatalError("`KeychainAttribute.Attribute.useDataProtectionKeychain is only available on macOS 10.15 and greater")