Environment
public enum Environment : String, CaseIterable
Undocumented
-
Undocumented
Declaration
Swift
case prod
-
Undocumented
Declaration
Swift
case qa
-
Undocumented
Declaration
Swift
case test
-
Undocumented
Declaration
Swift
public static let key: String
-
Stores the slected environment to user defaults
Declaration
Swift
public static func set(_ environment: Environment, userDefaultsKey: String = key)
Parameters
environment
.test, .qa, .prod
userDefaultsKey
String - A unique but static string
-
Reads the slected environment from user defaults.
Declaration
Swift
public static func currentEnvironment(userDefaultsKey: String = key) -> Environment
Parameters
userDefaultsKey
String - The key used to store the environment to user defaults
Return Value
The last saved environment