#if macros in Objective-C

Viewed 653

I am trying to define the value of a macro based on some condition like

#define DEV NO
#if DEV == YES
#define API_ENDPOINT_HOST @"https://my-dev.com/"
#else
#define API_ENDPOINT_HOST @"http://my-qa.com/"
#endif

But even though I have defined DEV as No, it is always taking API_ENDPOINT_HOST as @"https://my-dev.com/". What is wrong here?

3 Answers
Related