Skip to content

Commit 54577ea

Browse files
committed
Fixed Biometric login option visibility issue in login screen
1 parent 56eafd8 commit 54577ea

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

GoInfoGame/GoInfoGame/Helpers/Utils.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ struct Utilities {
4343
// _ = KeychainManager.delete(key: "username")
4444
loggedIn = false
4545
UserProfileCache.shared.clearUserProfile()
46-
if let bundleID = Bundle.main.bundleIdentifier {
47-
UserDefaults.standard.removePersistentDomain(forName: bundleID)
48-
}
46+
UserDefaults.standard.removeObject(forKey: APIConfiguration.environmentKey)
4947
}
5048
}

GoInfoGame/GoInfoGame/Network/APIConfiguration.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ import Foundation
1010
class APIConfiguration {
1111
static let shared = APIConfiguration()
1212

13-
private let environmentKey = "APIEnvironment"
13+
static let environmentKey = "APIEnvironment"
1414

1515
var environment: APIEnvironment {
1616
get {
17-
if let savedValue = UserDefaults.standard.string(forKey: environmentKey),
17+
if let savedValue = UserDefaults.standard.string(forKey: APIConfiguration.environmentKey),
1818
let savedEnvironment = APIEnvironment(rawValue: savedValue) {
1919
return savedEnvironment
2020
}
2121
return .production // default value
2222
}
2323
set {
24-
UserDefaults.standard.set(newValue.rawValue, forKey: environmentKey)
24+
UserDefaults.standard.set(newValue.rawValue, forKey: APIConfiguration.environmentKey)
2525
}
2626
}
2727

0 commit comments

Comments
 (0)