Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to configure independent sets of runtime settings in XCode
    primarykey
    data
    text
    <p>My iPhone application connects to three different servers, say: <strong>production</strong>, <strong>staging</strong> and <strong>testing</strong>. There is a bunch of configuration values that the application uses depending on to which server it connects to, e.g. Facebook App ID, TestFlight team key, etc.</p> <p>I'd like to have all the settings in GIT and only select which configuration the application supposed to use when compiling or releasing. For example, when <strong>testing</strong> is selected, <em>Product -> Run</em> in XCode runs the debug version of the app connecting to <strong>testing</strong>, and <em>Product -> Archive</em> creates the IPA file with the release version that also connects to <strong>testing</strong>.</p> <p>I don't want to create more build configurations than debug and release (because that would mean 6 different combinations of build configurations/run-time configurations). The ideal solution, as I see it, would be that I have three schemes: <strong>production</strong>, <strong>testing</strong> and <strong>staging</strong>, and each scheme selects one of three Info.plist files to use with the application. That would allow me to not only define different run-time settings, but also different application versions or bundle identifiers depending on the back-end server. But it doesn't look like I can configure the Archive action in any other way apart from selecting a different build configuration. Any ideas if that could be achieved in any way?</p> <p><strong>Edit:</strong> To make it a bit more clear, <strong>production/staging/testing</strong> is the back-end server, not the version of the iOS application. The iOS app comes in two versions: <strong>debug/release</strong>. In other words I may want to run a <strong>debug</strong> version of the application connecting to the <strong>production</strong> server for example to debug a crash caused by JSON returned from that server. I could have named the servers as A, B and C for the sake of clarity.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload