Xcode how to add an external project

泪湿孤枕 提交于 2019-12-10 12:58:11

问题


I need to add an external project to my Xcode project, the reason for this is I need to add a Target Dependency on that external projects static library.

I can't seem to add it in the way I need, I would like it like this:

However, when I add another project to my actual Xcode project I get the following which doesn't let me explore that project from my one and so I can't add the dependency I need.

Note that these screenshots are from two different projects, and in the one which is showing me what I want to reproduce in my own project, dragging in multiple projects works as expected.

Maybe I have some settings set up wrong in my project ? All I've done is take a template detail-master application from Xcode.


回答1:


You did it right. The problem is that Xcode cannot have the same project opened twice.

Close Serenity.xcodeproj before reopening your parent project.




回答2:


Yes, this is possible, it's called a workspace.

In your example:

  • Open both of your projects
  • Drag the Serenity project into the Dependant project

I think what you are doing wrong is dragging the Xcodeproj, try opening that project and dragging the project block instead (see pic)



来源:https://stackoverflow.com/questions/11036921/xcode-how-to-add-an-external-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!