Skip to content

Instantly share code, notes, and snippets.

@barrault01
Last active January 17, 2017 11:32
Show Gist options
  • Save barrault01/91cfafc18839411ed39e70a67139abae to your computer and use it in GitHub Desktop.
Save barrault01/91cfafc18839411ed39e70a67139abae to your computer and use it in GitHub Desktop.
struct Env {
private static let production : Bool = {
#if DEBUG
print("DEBUG")
return false
#elseif ADHOC
print("ADHOC")
return false
#else
print("PRODUCTION")
return true
#endif
}()
static func isProduction () -> Bool {
return self.production
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment