Skip to content

Commit

Permalink
Update KeychainAttribute.swift to check availability for iOS, tvOS, a…
Browse files Browse the repository at this point in the history
…nd watchOS as well
  • Loading branch information
mdmathias committed Jan 25, 2024
1 parent 10cac9e commit b3f59fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GTMAppAuth/Sources/KeychainStore/KeychainAttribute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
Expand Down

0 comments on commit b3f59fa

Please sign in to comment.