title: iPhone - Switching between local and production environment settings
body: <p>I am developing an iPhone app which uses a server somewhere to fetch its data. Somewhere in the app's source code I hardcoded the URL to use to connect to. This is fine, except that I don't always want to test using a production server! I don't want to mess with live data, just to test something locally. So I set up a local version of that same server. But in order to make the iPhone app use that server is to change the hardcoded URL in the source code.</p>
  
  <p>This is a little bit of a pain in the ass to do if you're often switching between the two servers. Also, I might accidentally release the app which still uses the local URL!</p>
  
  <p>I was thinking that maybe XCode can help me with this since it has the notion of a "Debug" and a "Release" configuration option to build with. So my question is: can I somehow change the Debug configuration in a way that it points to local server URL? Maybe through pointing to a properties or plist file which contains the environment specific URL. I could then make two versions of this properties file and make the debug configuration point to one, while make the release configuration point to the other.</p>
  
  <p>Does anyone know how I can accomplish this?</p>