Xcode 轻松地将多个文件添加到一个目标 [英] Xcode easily add multiple files to a target

查看:33
本文介绍了Xcode 轻松地将多个文件添加到一个目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Xcode 4.2 中为单元测试创​​建了一个新目标,显然我需要将某些应用程序文件引入该目标.但是有很多,点击每个.m文件然后点击TargetMembership并勾选新的目标框似乎很麻烦.

I've created a new target for unit tests in Xcode 4.2, and obviously i need to bring in certain application files into that target. But there is a lot, and it seems cumbersome to click each .m file then click TargetMembership and tick the new target box.

在我缺少的 Xcode 中是否有更简单的方法来执行此操作?

Is there an easier way to do this in Xcode that i'm missing?

谢谢

推荐答案

我想我不会用改进的答案来回答这个问题.通过 Xcode 主界面仍然很难做到这一点,就好像您过滤 .m 并尝试执行 CMD-A 以全选一样,它也会选择文件夹,因此您无法将这些添加到目标中.

I though't i'd return to this with an improved answer. It's still difficult to do this via Xcode main interface, as if you filter for .m and try and do CMD-A to select all, it selects the folders too, so you can't add these to the target.

但是,如果您转到项目设置">构建阶段">编译源".可以点击+按钮,过滤.m文件,这里可以CMD-A全选.

However, if you go to Project Settings > Build Phases > Compile Sources. You can click the + button, filter .m files, and you can CMD-A to select all here.

这有效.

这篇关于Xcode 轻松地将多个文件添加到一个目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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