Skip to content

Commit d21880f

Browse files
committed
reverting protected data changes
1 parent b379638 commit d21880f

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/CredentialStorage/AWSCognitoAuthCredentialStore.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
import Amplify
99
import Foundation
1010
@_spi(KeychainStore) import AWSPluginsCore
11-
#if canImport(UIKit)
12-
import UIKit
13-
#endif
1411

1512
struct AWSCognitoAuthCredentialStore {
1613

@@ -55,15 +52,6 @@ struct AWSCognitoAuthCredentialStore {
5552
self.keychain = KeychainStore(service: service)
5653
}
5754

58-
// During iOS prewarming or before first device unlock, keychain operations will fail
59-
// because protected data is not available. Check proactively before any keychain/UserDefaults access.
60-
#if canImport(UIKit) && !os(watchOS)
61-
guard UIApplication.shared.isProtectedDataAvailable else {
62-
log.verbose("[AWSCognitoAuthCredentialStore] Protected data not available")
63-
return
64-
}
65-
#endif
66-
6755
let oldAccessGroup = retrieveStoredAccessGroup()
6856
if migrateKeychainItemsOfUserSession {
6957
try? migrateKeychainItemsToAccessGroup()

0 commit comments

Comments
 (0)