Created
January 17, 2017 11:45
-
-
Save barrault01/74e021adba9ec47d55be95dbd4ba437d 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
struct Env { | |
private static let production : Bool = { | |
#if DEBUG | |
print("DEBUG") | |
let dic = ProcessInfo.processInfo.environment | |
if let forceProduction = dic["forceProduction"] , forceProduction == "true" { | |
return true | |
} | |
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