Created
February 25, 2015 03:56
-
-
Save eito/fac87597e438a523a6bf to your computer and use it in GitHub Desktop.
swift conditional compile
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
#if DEBUG | |
println("Debug mode") | |
#else | |
println("Release Mode") | |
#endif | |
#if false | |
println("This code will never run") | |
#endif | |
#if os(iOS) | |
println("This is iOS") | |
#else | |
println("This is NOT iOS") | |
#endif | |
#if arch(x86_64) | |
println("64 bit simulator") | |
#elseif arch(i386) | |
println("32 bit simulator") | |
#elseif arch(arm) | |
println("32 bit arm device") | |
#elseif arch(arm64) | |
println("64 bit arm device") | |
#else | |
println("Unknown device") | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment