iosobjective-cios7

How to run application in debug mode and release mode with different API's in iOS


Please help me with this issue. I have to run my application in debug mode with one API starting with and in release mode I have to run another API starting with.

In debug mode I use like this API http://def.info/api/homeapi/Login and in release mode I should use like http://abc.info/api/homeapi/Login.If I want to run in release mode or debug mode I'm changing all my API's according to that, but I know this is not the correct way to do it. Please help me.


Solution

  • Let's try:

    #ifdef DEBUG
    #define LINK_API @"LINK THAT YOU WANT"
    #else
    #define LINK_API @"LINK THAT YOU WANT"
    #endif