File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change @@ -10,18 +10,18 @@ import Foundation
1010class 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
You can’t perform that action at this time.
0 commit comments