Xcode:如何使用带有跨项目引用的单独项目将框架嵌入到您的应用程序中? [英] Xcode: How to use separate Projects with cross-project references to embed a framework in your application?

查看:86
本文介绍了Xcode:如何使用带有跨项目引用的单独项目将框架嵌入到您的应用程序中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xcode 4.3.

I am using Xcode 4.3.

  • 我有一个现有的Xcode项目(最初在Xcode 3中创建),用于可嵌入的Mac OS X框架.这个项目有几个目标,但是这个项目的主要目标是针对我的框架.该框架旨在嵌入Mac Apps中,并设置了适当的安装目录"属性. (@executable_path/../Frameworks)

我有一个针对Mac OS X应用程序的新Xcode项目(刚刚在Xcode 4中创建).此项目中只有一个Mac App Target.

I have a new Xcode Project (created just now in Xcode 4) for a Mac OS X Application. There is only a single Mac App Target in this Project.

我想将旧的Framework Project和/或Target组合到新的App Project中,这样我就可以在单个组合的构建过程中从源代码构建App和Framework. (我在Xcode 3中已经做过很多次,但是在Xcode 4中却无法弄清楚).

I would like to combine my old Framework Project and/or Target into the new App Project so that I can build both the App and Framework from source in a single, combined build process. (I have done this in Xcode 3 many times, but cannot figure it out in Xcode 4).

(除非这是唯一的方法)想要分别构建我的框架,然后从我的App Project中链接到它.我想组合框架目标到我的Mac App Project中.

I do not (unless it's the only way) want to build my Framework separately and then just link to it from my App Project. I want to combine the Framework Target into my Mac App Project.

这是苹果公司过时的文档,描述了如何在Xcode 3中做我想做的事情.

Here's Apple's outdated documentation describing how to do what I want in Xcode 3:

在应用程序捆绑包中嵌入私有框架>为每个目标使用单独的Xcode项目

您如何在Xcode 4中做到这一点?

How do you do this in Xcode 4?

注意:我只需要知道如何将我的Framework Target添加到新项目中.从那里,我知道如何添加依赖项以及完成将构建的框架链接和复制到应用程序捆绑包中的所有构建阶段.

Note: I just need to know how to add my Framework Target to the new Project. From there, I know how to add the dependencies and do all the Build Phases of linking and copying the built Framework into the app bundle.

推荐答案

您实际上在这里有2个单独的Xcode项目文件:应用程序和框架.答案是找到的内容下面的部分:

You actually have 2 separate Xcode project files here: Application and Framework. The answer is the section below the one you find: Using Separate Xcode Projects For Each Target

好.现在我想起了.您需要创建一个工作区并将两个项目添加到其中.然后,您可以将一个项目中的目标添加到另一个项目中以进行依赖:

OK. Now I remember. You need to create a workspace and add both projects to it. Then you can add target in one project to the other for dependency: Adding an Existing Project to a Workspace

由于我现在没有Mac,因此我没有所有详细信息.但是我认为一旦创建了工作区,您就可以弄清楚.

I don't have all the details since I don't have a Mac now. But I think you can figure it out once you created the workspace.

这篇关于Xcode:如何使用带有跨项目引用的单独项目将框架嵌入到您的应用程序中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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