两个项目之间的 xcode 目标依赖项

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15323603/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 02:56:32  来源:igfitidea点击:

xcode target dependencies between two projects

xcodedependenciesnsbundle

提问by notsurewhattodo

I have a problem with setting dependencies in XCode 4 between separate projects. Currently, I have two projects in the same workspace. The firstproject have a Frameworkamongst it's products. I would like to use this framework in the secondproject, as a dependency for Bundletarget.

我在不同项目之间设置 XCode 4 中的依赖项时遇到问题。目前,我在同一个工作区中有两个项目。第一个项目的产品中有一个框架。我想在第二个项目中使用这个框架,作为Bundle目标的依赖。

First project build successfully. However, the second one claims that it cannot access headers from the framework, although it exists in there. I added the framework to Build Phases -> Link Binary With Librariessection of my target, but this does not help. I was looking for an answer, but all I found were suggestions to add library on the Summarypage. Unfortunately, in opposite to Applicationtargets, Bundletarget does not have this pane. Is there any other place where should I add the framework?

第一个项目构建成功。但是,第二个声称它无法从框架访问标头,尽管它存在于框架中。我将框架添加到目标的Build Phases -> Link Binary With Libraries部分,但这无济于事。我一直在寻找答案,但我发现的只是在“摘要”页面上添加库的建议。不幸的是,与应用程序目标相反,捆绑目标没有此窗格。还有其他地方应该添加框架吗?

回答by David M.

This answer describes the current procedure for adding a library dependency, including headers: https://stackoverflow.com/a/9726445/382938

此答案描述了添加库依赖项的当前过程,包括标题:https: //stackoverflow.com/a/9726445/382938