Does Xcode 7 debug mode work?
Using Xcode 7 Beta 3
The code below cannot enter the instruction correctly #if DEBUG
. I'm pretty sure I'm in debug mode, but for some reason the following code doesn't work:
#if DEBUG
btnPrintPath.title! = "PrintPath"
#else
btnPrintPath.title! = "" // EXECUTING THIS LINE.
#endif
My schematic looks like this:
I am running my application with cmd + R
.
Am I setting this up wrong?
+3
source to share
1 answer
Add -D DEBUG
to "Swift Compiler - Custom Flags" → "Other Swift Flags".
There is no official documentation that mentions this feature (you might want to write a radar for it), but I saw it used in this linked answer .
+5
source to share