Search code examples
xcode4build-processworkspace

Xcode 4 workspace: adding framework from project B as dependency to project A


This should be simple, but I can't figure out how to do this in Xcode 4:

I have an Xcode workspace with two top level projects:

  • Project A (app): the application depends on Framework built by project B
  • Project B (framework): one target to build the Framework

I would like to add the Framework target from Project B as a dependency to the application target of Project A. However, in the Build Phases > Target Dependencies for Project A's target, I only see Project A (not the framework target of Project B).

I'm still refining the framework so I wold like to have the application target build the framework automatically whenever it changed.

Is there a way to do this without making the framework project a child of Project A?


Solution

  • Here's what I finally figured out:

    With both projects as top level projects in a workspace:

    • Add the framework project to Project A, but make sure "Copy.." is not checked when adding it. The framework project will then show up as child element in Project A and as top level element in the workspace.