Xcode中的Target究竟是什么? [英] What exactly is an Target in Xcode?

查看:333
本文介绍了Xcode中的Target究竟是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在想这些目标是什么?这是什么一回事呢?那是什么意思?我从来没有玩弄它们,但显然我可以。我为什么要这样,我能用它做什么?他们的目的是什么?

I was always wondering what's up with those Targets? What is it all about? What's the point of that? I never had to fiddle around with them, but obviously I can. Why should I want that, and what can I do with them? What's their purpose?

推荐答案

每个项目都可以构建多个可执行文件或库,或者调用makefile或shell脚本来构建东西 。其中每一个都是一个目标。

Each project can build multiple executables or libraries or call out to a makefile or shell script to build "stuff". Each one of these is a Target.

我有一个iPhone项目,包括我家乡SDK中每个静态库的单独目标和构建Doxygen的shell脚本目标文档。另一个项目包括两个目标,一个用于一般用户使用的应用程序,一个用于管理和管理版。

One iPhone project I have includes a separate target for each static library in my home grown SDK and a shell script target to build the Doxygen docs. Another project includes two targets, one for the app as used by general users, one for an administration & management edition.

在第一个例子中,我需要构建每个库,然后将所有静态库链接到SDK测试应用程序,因此我的SDK测试应用程序依赖于所有库目标(但不是文档,因为我不需要不断地重新生成它们。)

In the first example, I need to build each library then link all the static libraries into an SDK test application, so my SDK Test App depends on all the library targets (but not the docs, since I don't need to constantly regen them.)

在第二个示例中,应用程序共享的管理和一般版本相当数量的代码和资源。当我换一个时,我想改变它们。

In the second example, the management and the general versions of the app share a considerable amount of code and resources. When I change one, I want to change them both.

这篇关于Xcode中的Target究竟是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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