以x code指定子项目的配置 [英] Specifying a subproject's Configuration in XCode

查看:83
本文介绍了以x code指定子项目的配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个X code项目( A )引用另一个项目( B )。默认情况下(据我所知)x code将隐式建立了 A的配置相匹配的 B 相关性配置的目标位置(例如,调试)。但是,如果我想,说, A 打造为调试和 B 打造为释放 ?我怎么会去指定的X code吗?

I have an XCode project (A) referencing another project (B). By default (as far as I understand it) XCode will implicitly build the configuration for the B dependency that matches the configuration of the A's target (e.g., "Debug"). But what if I want, say, A to build as "Debug" and the B to build as "Release"? How would I go about specifying that in XCode?

推荐答案

我不知道有什么简单的方法,但你可以通过直接调用x codebuild对于具有运行脚本的依赖暴力破解它建设阶段。

I don't know of any easy approach, but you can brute-force it by calling xcodebuild directly for the dependency with a "Run Script" build phase.

我知道这只是一个例子,但如果你真正的目标是,子项目是一个释放(没有符号)建立,那么你可能需要通过刚刚建设子项目到图书馆或框架更好的体验并检查生成的二进制文件到你的版本控制系统。每当我有一块很少变化,而且我也不想为,我继续构建它作为一个静态库,并检查它在调试符号。我经常继续和其他移动code为系统好(用,说那里的code是一个.A README文件,以及它如何建)。这样可以节省两个构建和结账的时候,是无价的在我的经验大型项目。

I know it was just an example, but if your real goal is that the sub-project be a Release (no symbols) build, then you may have a better experience by just building the sub-project into a library or framework and checking the resulting binary into your version control system. Whenever I have a piece of the system that seldom changes and that I don't want debug symbols for, I go ahead and build it as a static library and check it in. I often go ahead and move the code elsewhere as well (with a README file with the .a that says where the code is and how it was built). This saves time on both build and checkout and is invaluable for large projects in my experience.

这篇关于以x code指定子项目的配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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