In C# I can use the following code to have code which only executes during debug build, how can I do the same in Xcode?
#if DEBUG { // etc etc } #endif
The NDEBUG symbol should be defined for you already in release mode builds
#ifndef NDEBUG /* Debug only code */ #endif
By using NDEBUG you just avoid having to specify a -D DEBUG argument to the compiler yourself for the debug builds