如何在主项目中包含多个 Xcode 项目 [英] How to include multiple Xcode projects in a master project

查看:42
本文介绍了如何在主项目中包含多个 Xcode 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近询问了 使用多个 Xcode 项目的智慧 分隔项目组件.我决定在我的下一个项目中遵循这条路线.

I recently asked about the wisdom of using multiple Xcode projects to separate project components. I have decided to follow this route in my next project.

我试图通过将另一个项目拖放到侧边栏来将另一个项目添加到主 Xcode 项目中.但是,当我#import 添加的项目中定义的任何类时,我被告知找不到这些类.

I attempted to add another project to a master Xcode project by dragging and dropping it into the sidebar. However, when I #import any of the classes that are defined in the added project I am informed that those classes cannot be found.

我需要做什么才能在主项目中引用其他项目中的类?令我惊讶的是,我在网络上几乎找不到有关如何执行此操作的信息.

What do I need to do in order to be able to refer to the classes in other projects in a master project? I was surprised that I found virtually no information on how to do this on the web.

推荐答案

Project ->编辑项目设置

使用标题搜索路径

这是在编译 C、Objective-C、C++ 或 Objective-C++ 时编译器要搜索的文件夹路径列表,以查找包含或导入的用户头文件(引号中列出的那些头文件)代码>.路径由空格分隔,因此任何包含空格的路径都需要正确引用.有关如何使用此设置的更多详细信息,请参阅 Always Search User Paths 构建设置的说明.如果编译器不支持用户标头的概念,则搜索路径将添加到 Header Search Paths 中定义的任何现有标头搜索路径.[USER_HEADER_SEARCH_PATHS, -iquote]

This is a list of paths to folders to be searched by the compiler for included or imported user header files (those headers listed in quotes) when compiling C, Objective-C, C++, or Objective-C++. Paths are delimited by whitespace, so any paths with spaces in them need to be properly quoted. See the description of the Always Search User Paths build setting for more details on how this setting is used. If the compiler doesn't support the concept of user headers, then the search paths are prepended to the any existing header search paths defined in Header Search Paths. [USER_HEADER_SEARCH_PATHS, -iquote]

这篇关于如何在主项目中包含多个 Xcode 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆