Reputation: 485
I've got a number of iOS apps that rely on an API with both a dev and live URL. What is the best way to make sure that the live URL is always used for submitted to the App Store and the dev for debugging?
Upvotes: 0
Views: 101
Reputation: 1137
Your debug configuration should have a DEBUG
macro which you can test for in your code to switch between URLs. See this related post.
#ifdef DEBUG
url = [NSURL urlWithString:@"http://api.example.com"];
#endif
Upvotes: 2