Created
June 24, 2019 12:13
-
-
Save bestiosdeveloper/344bd26d91d2d05467b8af1a975cfff9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
enum Environment: String { | |
case production | |
case testing | |
case development | |
} | |
class PKSettingsBundleHelper { | |
static let shared = PKSettingsBundleHelper() | |
private init() {} | |
var currentEnvironment: Environment { | |
if let env = UserDefaults.standard.string(forKey: "currentEnvironment") { | |
return Environment(rawValue: env.lowercased()) ?? Environment.production | |
} | |
return Environment.production | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment