在另一个 XCode 项目中导入 XCode 项目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12409881/
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 01:29:12  来源:igfitidea点击:

Import XCode project inside another XCode project

iosxcodeimportdependencies

提问by bruno

I imported an XCode project inside another XCode project. I dragged and dropped project B inside project A like in How to Call Xcode Project In Another Xcode Project.......?

我在另一个 XCode 项目中导入了一个 XCode 项目。我将项目 B 拖放到项目 A 中,就像如何在另一个 Xcode 项目中调用 Xcode 项目......?

Next, i imported a class from project B in project A, so i could use a method but i gave me an error "ClassTemp.h' file not found".

接下来,我从项目 A 中的项目 B 导入了一个类,因此我可以使用一种方法,但我给了我一个错误“找不到 ClassTemp.h' 文件”。

From what i′ve read this should have worked. Do i have to do some kind of configuration for it to work?

从我读过的内容来看,这应该有效。我是否必须进行某种配置才能使其工作?

采纳答案by DrummerB

Try adding the location of your other project to the Header Search Pathsin the Build Settingsof the main project.

尝试将其他项目的位置添加到主项目的构建设置中的标题搜索路径

回答by Nirav Dangi

This worked for me,

这对我有用,

In build settings--> Header Search Path--> Add below entry

在构建设置-->标题搜索路径--> 添加以下条目

$(SRCROOT) and mark it as recursive.

If above not worked you can also try following way,

<path-of-other-project> and mark it as recursive.

Hope this helps to you ! (You may require to clean or restart the workspace)

$(SRCROOT) and mark it as recursive.

如果以上方法不起作用,您也可以尝试以下方法,

<path-of-other-project> and mark it as recursive.

希望对您有所帮助!(您可能需要清理或重新启动工作区)