#ifdef replacement in the Swift language
Yes you can do it. In Swift you can still use the “#if/#else/#endif” preprocessor macros (although more constrained), as per Apple docs. Here’s an example: #if DEBUG let a = 2 #else let a = 3 #endif Now, you must set the “DEBUG” symbol elsewhere, though. Set it in the “Swift Compiler – Custom Flags” … Read more