Skip to content

Instantly share code, notes, and snippets.

@alvaroroyo
Last active October 24, 2019 00:27
Show Gist options
  • Save alvaroroyo/32249288d3de05026bfb56e5f14c3be7 to your computer and use it in GitHub Desktop.
Save alvaroroyo/32249288d3de05026bfb56e5f14c3be7 to your computer and use it in GitHub Desktop.
enum AppEnvironments {
case Dev, Pre, Pro
}
var environment: AppEnvironments {
get {
let bundleId = Bundle.main.bundleIdentifier ?? ""
switch bundleId {
case "com.timbrit.dev": return .Dev
case "com.timbrit.pre": return .Pre
case "com.guru.timbrit": return .Pro
default: return .Dev
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment