title: Why does xcodebuild give different build results than XCode UI
body: <p>I have a series of projects within a workspace, and trying to use the following type of command to build them via the command line:</p>
  
  <pre><code>"Xcodebuild -project XXX"
  or 
  "Xcodebuild -workspace XXX -scheme YYY"
  </code></pre>
  
  <p>Some of my projects build fine but others give strange errors, like "'XXX' for instance message does not declare a method with selector" or "ld: library not found for -lMyLibrary"</p>
  
  <p>However all these projects build fine from within the XCode UI without issues.</p>
  
  <p>Based on this is seems that the command line and UI builds are using a different toolset, but that seems like a very bad idea so I'm hoping I'm wrong about this. Or possibly there are just a few different build flags being set on the command line build.</p>
  
  <p>I can try to troubleshoot the issues one by one but I'm hoping I can write a script which does the exact same type of build as the UI. </p>
  
  <p>Any ideas?</p>