Basically, I want to have something like
struct Config_DEVELOPMENT
{
static let ENVIRONMENT = "PRODUCTION"
static let BASE_URL = "https://dev.technoburgh.com"
static let API_KEY = "dev-key"
}
struct Config_TEST
{
static let ENVIRONMENT = "PRODUCTION"
static let BASE_URL = "https://dev.technoburgh.com"
static let API_KEY = "dev-key"
}
struct Config_PRODUCTION
{
static let ENVIRONMENT = "PRODUCTION"
static let BASE_URL = "https://dev.technoburgh.com"
static let API_KEY = "dev-key"
}
But I'd like to be to switch the config options at run time, so QA can test out different envs at the same time, like see if an issue is reproducible in both prod & dev or just one env,etc.
I know I could use a settings bundle but I am wondering if there is a different approach to it in swift.