Sometimes I have to turn certain features on for a project, like some flags or itunes file sharing that I do not want to be turned on when I archive the project to submit it to Apple.
Is there a way to force to prevent a project from compiling correctly and show an error on Xcode (I mean that red badge icon on Xcode’s toolbar) if certain conditions are met?
Something like
if (some condition)
do not compile or cause a compile error
I need xcode to tell me that I have forgotten something that is not supposed to ship on the final release.
thanks.
There is a preprocessor directive
#errorthat should work for you:From the C standard: