Search code examples
iphonecocoa-touchxcodeipadxcode4

what is the difference between target and project?


here are the images of the project and target

what is the difference between this two?

why both are given? enter image description here

An image of project..

enter image description here An image of target..


Solution

    • A project is a set of files and general preferences.
    • A target is a subset of the files, and specific preferences (which override the project preferences).
    • Each target builds a product, which may be a library, executable, or framework.
    • Because a target builds something, it also has Build Phases and Build Rules, where you can add dependencies, and refine what gets copied where and how.

    It's a good thing to have both because it lets you create different products from the same set of files. As an example, you can target different architectures/devices, or build a testing product which runs unit tests against your code.