Xcode:添加项目作为构建依赖项
Im playing around with the soundcloud api, in its instructions it says to
- drag SoundCloudAPI.xcodeproj into your project
- add it as a build dependency
I can drag the project in pretty easily, but how does one accomplish the next step?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
要将其添加为依赖项,请执行以下操作:
To add it as a dependency do the following:
对于像我这样的新手来说,这很困难 - 这是描述它的屏幕截图。
Xcode 10.2.1
Tough one for a newbie like me - here is a screenshot that describes it.
Xcode 10.2.1
在项目中的
TARGETS
下,右键单击您的项目目标(应与您的项目名称相同)并选择GET INFO
,然后在GENERAL
选项卡上,您将看到DIRECT DEPENDENCIES
,只需单击[+]
并选择SoundCloudAPI
。Under
TARGETS
in your project, right-click on your project target (should be the same name as your project) and chooseGET INFO
, then onGENERAL
tab you will seeDIRECT DEPENDENCIES
, simply click the[+]
and selectSoundCloudAPI
.只需关闭要添加的项目,然后拖放该文件即可。
Just close the Project you want to add , then drag and drop the file .
Xcode 添加项目作为依赖项
Xcode 10
跨项目引用
[关于]显式依赖项
[关于]在
选择要添加的项目:
对话框中,您将仅看到项目中的目标和子项目Xcode add a project as a dependency
Xcode 10
cross-project references
[About]Explicit dependency
[About]In
Choose items to add:
dialog you will see only targets from your project and the sub-project今天我遇到了同样的问题。
第一次运行的结果是我得到了下一个错误:
但在运行之前,显然,我将 SDK 添加到了演示项目中,只需将 .xcodeproj 文件拖放到我的测试项目的源代码树中即可。之后,我进入主 xcodeproj 文件(演示)设置中的“构建阶段”选项卡,并将我的 SDK 添加为目标依赖项并将框架嵌入到相应的选项卡中。
但结果我得到了上面的错误!
因此,问题出在标题搜索路径选项上的空行中。我刚刚编写了
"../**"
作为此键的值,并且项目编译成功。因此,之后,您可以将#include
添加到包含此 SDK 的任何项目中。附注我的测试应用程序被创建到根 SDK 文件夹中。
Today I faced with the same problem.
As the result of the first run I got next error:
But before running, I, obviously, added my SDK into the demo project, just drag&drop .xcodeproj file into my test project's source tree. After that, I moved into Build Phases tab in setting of the main xcodeproj file (of the demo) and added my SDK as target dependency and embed framework into corresponding tabs.
But at the result, I got an error above!
So, the problem was into empty line on the Header Search Paths option. I just wrote
"../**"
as value for this key and project compiled successfully. So, after that, you can add#include <SDKName/SDKName.h>
into any project, which includes this SDK.ps. My test app was created into root SDK folder.