Is there a way to create an if statement based on compile settings? I have an App that accesses a web-based API and when compiling in debug mode I want it to use the private beta version but when I compile for release I want it to use the public live version of the API.
At the moment I just have a NSString holding the url address.
Typically for this sort of thing you would use a preprocessor directive:
You can either define your own
DEBUG_MODEsymbol, or you can use an existing one (I’m not sure what it might be called for the iPhone SDK).