简体   繁体   English

项目内的Xcode项目

[英]Xcode project inside project

I'm taking over some project of a colleague that is on holidays now.我正在接手一位同事现在正在休假的一些项目。

Other projects have gone fine, but in this particular one, I have found a project inside a project, like using a framework I guess.其他项目进展顺利,但在这个特别的项目中,我在一个项目中发现了一个项目,我猜想使用一个框架。

So what is the name of this technique?那么这项技术的名称是什么?

项目内项目树图像

How to insert and interact with it?如何插入并与之交互? just import?只是进口?

They are called cross project references.它们被称为跨项目引用。 From the link below:从下面的链接:

Cross-project references are a convenient way to create relationships between two separate Xcode projects.跨项目引用是在两个单独的 Xcode 项目之间创建关系的便捷方式。

One method of creating shared frameworks is using sub-projects.创建共享框架的一种方法是使用子项目。 You can also do it with single projects.您也可以使用单个项目来完成。 More here:更多在这里:

http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/CreatingFrameworks.html http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Tasks/CreatingFrameworks.html

Other links:其他链接:

XCode 4 Adding a Sub Project XCode 4 添加子项目

cross-project references aka project in project aka sub-project aka nested projects . cross-project references也就是project in projectsub-projectnested projects This approach uses Explicit dependency [About] 这种方法使用Explicit dependency [关于]

If you already have separate Xcode projects for your framework and application, you can take advantage of Xcode's cross-project references to embed the framework in your application. 如果您的框架和应用程序已经有单独的Xcode项目,那么您可以利用Xcode的跨项目引用将框架嵌入到您的应用程序中。 Cross-project references are a convenient way to create relationships between two separate Xcode projects. 跨项目引用是在两个单独的Xcode项目之间创建关系的便捷方式。

To define explicit dependencies between targets in separate project files, project files should be nested . 要在单独的项目文件中定义目标之间的显式依赖关系,应嵌套项目文件。 This means that a target can set explicit dependencies of any other target within the same project file, or any nested child project file. 这意味着目标可以在同一项目文件或任何嵌套的子项目文件中设置任何其他目标的explicit dependencies项。

This approach allows you to automatically build a binary with the rest of your app, using your current build configuration (eg, debug, release, etc.) and avoid pre-building several versions of the binary separately (where each version was built for a specific environment/configuration) using Explicit dependency [About] [How to setup] 这种方法允许您使用当前的构建配置(例如,调试,发布等)自动构建与应用程序其余部分的二进制文件,并避免单独预构建多个版本的二进制文件(其中每个版本都是为特定环境/配置)使用Explicit dependency [关于] [如何设置]

Please read Clint Harris article 请阅读Clint Harris的文章

In XCode 4, the idea of workspaces [About] is supposed to supersede the functionality of XCode 3s cross-project references 在XCode 4中, workspaces [About]的想法应该取代XCode 3s cross-project references

cross-project references aka project in project aka sub-project aka nested projects . cross-project references又名project in project又名sub-project又名nested projects This approach uses Explicit dependency [About] [How to setup]这种方法使用Explicit dependency [关于] [如何设置]

If you already have separate Xcode projects for your framework and application, you can take advantage of Xcode's cross-project references to embed the framework in your application.如果您的框架和应用程序已经有单独的 Xcode 项目,您可以利用 Xcode 的跨项目引用将框架嵌入到您的应用程序中。 Cross-project references are a convenient way to create relationships between two separate Xcode projects.跨项目引用是在两个单独的 Xcode 项目之间创建关系的便捷方式。

To define explicit dependencies between targets in separate project files, project files should be nested .要在单独的项目文件中定义目标之间的显式依赖关系,项目文件应该嵌套 This means that a target can set explicit dependencies of any other target within the same project file, or any nested child project file.这意味着目标可以在同一项目文件或任何嵌套的子项目文件中设置任何其他目标的explicit dependencies项。

In XCode 4, the idea of workspaces [About] is supposed to supersede the functionality of XCode 3s cross-project references在 XCode 4 中, workspaces [About]的想法应该取代 XCode 3 cross-project references

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM