title: How do you get implicit dependencies to work with workspaces in Xcode 4?
body: <p>I want to manage projects in workspaces using Xcode 4 with Cocoa Touch Static Library projects which contain shared code that I could reference from other projects. According to WWDC 2010 videos and the Xcode 4 documentation there is a feature for "implicit dependencies" for workspaces in Xcode 4. I have been trying to make it work and I am not having much success.</p>
  
  <p>Sample Workspace: <a href="http://www.smallsharptools.com/downloads/iOS/DependenciesInXcode4.zip" rel="nofollow noreferrer">DependenciesInXcode4.zip</a></p>
  
  <p>You can see the very basic sample project has 2 static library projects which I named Library1 and Library2. I then have a single class in each project which I reference from the iPhone project called PrimaryApp. I get support from Code Sense when adding the import statement but the build fails.</p>
  
  <p><img src="https://i.stack.imgur.com/dAdPI.png" alt="Build Failed"></p>
  
  <p>You can see how the build fails because it cannot find the dependencies.</p>
  
  <p><img src="https://i.stack.imgur.com/DFEEc.png" alt="Build Errors"></p>
  
  <p>To resolve these issues I added manually linked the Library1 and Library2 projects.</p>
  
  <p><img src="https://i.stack.imgur.com/a96D0.png" alt="Manual Linking"></p>
  
  <p>I also had to add the path to these projects as Header Search Paths.</p>
  
  <p><img src="https://i.stack.imgur.com/xxzKR.png" alt="Manually Reference Headers"></p>
  
  <p>Now when I build both of the dependency libraries and then run PrimaryApp in the iPhone Simulator it builds successfully and runs. I have found that it does not always ensure that the dependency projects are built when necessary and this is clearly a manual process. This is not what I consider "implicit dependencies" as the Xcode videos and documentation imply that it should work. I have been looking for more concrete examples but so far I have had no luck. Even here on Stackoverflow I do not see a satisfactory answer yet.</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/5483909/how-should-i-manage-dependencies-across-projects-in-an-xcode-workspace">How should I manage dependencies across projects in an Xcode workspace?</a></li>
  <li><a href="https://stackoverflow.com/questions/5427396/whats-the-correct-way-to-configure-xcode-4-workspaces-to-build-dependencies-when">What's the correct way to configure XCode 4 workspaces to build dependencies when needed?</a></li>
  </ul>
  
  <p>It appears that developers are falling back to old techniques and not truly using the new "implicit dependencies" features.</p>
  
  <p>I'd appreciate some help with understanding how to get "implicit dependencies" to work with workspaces in Xcode 4. </p>
  
  <p>Here are my questions:</p>
  
  <ul>
  <li>How are "implicit dependencies" supposed to work in Xcode 4 with workspaces? </li>
  <li>Why can't the code in Libary1 and Library2 be found automatically in PrimaryApp?</li>
  <li>Are additional changes required to make dependencies work in a workspace?</li>
  </ul>