开发者

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

开发者 https://www.devze.com 2023-04-02 19:46 出处:网络
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:

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 Dependenc开发者_如何学JAVAies 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?


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.


Good article about project dependencies in Xcode 4: https://docs.google.com/document/pub?id=14XR5zcZb2Kz2s6A4AbzB00NLkrW9bWxMMprVsUao-hY

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号