title: Xcode 4: How to Add Static Library Target Dependency to Project
body: <p>I know, this has been asked a few times, but mostly for Xcode 3.x. For the iPad, I have two projects both living in a common workspace</p>
  
  <ul>
  <li>Foo, a view-based application and</li>
  <li>Foolib, a static Cocoa-Touch library</li>
  </ul>
  
  <p>the former depending on the latter. I seem unable to work out how to add that dependency. It's not well explained in the documentation, so I tried the following:</p>
  
  <ol>
  <li>Click on the Foo project in the Navigation Area on the left,</li>
  <li>Select Build Phases up the top and expand the Target Dependencies section</li>
  <li>Click the plus button, but the resulting list is empty.</li>
  </ol>
  
  <p>I have also tried to drag/drop the .a file into that section, with little success. Also, the documentation states</p>
  
  <blockquote>
    <p>If the build product of one project in a workspace is dependent on the build product of another project in the workspace (for example, if one project builds a library used by the other project), Xcode discovers such implicit dependencies and builds in the correct sequence.</p>
  </blockquote>
  
  <p>I wonder how Xcode discovers those dependencies. Is Apple saying I don't have to add this target dependency at all? But then how would Xcode discover that one is using the other?</p>
  
  <p>Last but not least, I will need to get the .h files from Foolib across to Foo somehow. What is the recommended way of doing that? Obviously, I don't want to just copy them. With frameworks the header files come included, but what do people generally do when working with static libraries that they themselves develop in parallel.</p>
  
  <p>A nudge in the right direction would be much appreciated. Thank you.</p>