Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between add to target & add to project in XCode

I am trying to inegerate Google Toolbox for mac for unit testing purposes on this page http://code.google.com/p/google-toolbox-for-mac/wiki/iPhoneUnitTesting is says add blahblah.m file to your target & add blahblah.m file to your project.

What is the difference, how should I add to target...

like image 515
Asad Khan Avatar asked Oct 18 '10 12:10

Asad Khan


People also ask

What is an aggregate target?

An aggregate target has no associated product and no build rules. Instead, an aggregate target depends on each of the targets you want to build together. For example, you may have a group of products that you want to build together. You would create an aggregate target and make it depend on each of the product targets.

What is the difference between project and target in Xcode?

A target specifies a product to build, such as an app, framework, app extension, or unit test. A project can contain multiple targets, usually representing related parts of a single product. For example, a project might contain separate targets for an app, a private framework, an app extension, and a suite of tests.


1 Answers

In order to "Add to project" you simply have to drag the file into Xcodes sidebar. Eventually it should look like this:

Xcode sidebar screenshot

"Add to target" means that the file has to be in the "Compile Sources" group of your LogicTests-target.

Xcode target screenshot

You can also check if a file has been added to the currently active target by looking at the right Checkbox in the "Detail" panel:

Xcode detail panel

like image 179
Chilloutman Avatar answered Oct 03 '22 16:10

Chilloutman