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 debu
Let's try:
#ifdef DEBUG
#define LINK_API @"LINK THAT YOU WANT"
#else
#define LINK_API @"LINK THAT YOU WANT"
#endif
You should create a BASE URL string. This string should be set dynamically based on debug or release mode. Pre-processor macro can help you to decide the mode of the application.
Once it is ready you should create rest of the URLs based on your need.
NSString *baseURLString;
#ifdef DEBUG
baseURLString = @"http://def.info/api/homeapi/";
#else
baseURLString = @"http://abc.info/api/homeapi/";
#endif
NSString *serviceType = @"login";
NSString *loginURLString = [NSString stringWithFormat:@"%@%@",baseURLString, serviceType];