In Xcode 3 it was easy to get an overview of which files are activated for current active target. I love the new feature in Xcode 4 where you can see all the targets a specific file is active for (its like an inversed view of xcode 3). Is there some mysterious way of getting that good ol' view back?
It would be really handy when specifying test-files and nibs for different targets...
Image from that good ol' list in xcode 3:
When you create a new project from a template, Xcode adds one or more targets to the project automatically. For example, the multiplatform app template contains separate targets for an iOS app and Mac app. To view the targets in a project, select the project in the navigator area.
I include them in the project by right-clicking on the project folder in the project view in Xcode, and selecting "Add Files to ...". I then navigate to the folder containing the source files, click on the folder and select "Add." With the options "Create folder references" and "Add to target [target name]".
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.
Expanding on tomwhipple's answer, there is a way to see all the files that are not part of a target.
Go to -> Build Phases -> Compile Sources and hit the '+' button. This will show you all the files that are not part of the target. However, this list is pretty cluttered with things that really shouldn't be in your target. But you can type ".m" in the search bar to only show the classes that aren't included.
By Target: Navigate to the project, then select the target and expand the various build phases. It's more specific because it shows you what role the file(s) play in the target.
By file: Select the file in the navigator and open the Utility pane. The targets list is shown there (but only for that one file).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With