title: How to use different values for variables in different targets of the same Xcode project?
body: <p>I have a project with the same code base for different targets, which need different values for some variables. What is the best way to achieve that? Here are my thoughts:</p>
  
  <ul>
  <li>Use a different property list resource containing the values for each target. Con: I have to parse the property list at runtime to get the values. The values appear in clear if someone looks inside the application bundle.</li>
  <li>Use <code>#define</code>s in different include files. Con: For each new target, I have to use macro conditionals to include the correct file in the implementation.</li>
  <li>Use a different implementation file for each target:
  <ul>
  <li>with constant global variables. Con: The namespace is polluted by these global variables.</li>
  <li>with a class whose properties are the variables. Con: Each implementation has to rewrite the glue code for the properties.</li>
  </ul></li>
  </ul>
  
  <p>Does anyone has a good solution? Or is better to factor the common code base into a library and use different projects each time?</p>