Where are my targets in Xcode 4? - xcode

In Xcode 3, I had a list of targets in the left column. They're not there anymore. There's a list in the Scheme pull-down, but I can't find them anywhere else. Have they changed name to "Schemes"?

Click the button as below images

Targets are still there. Click on the project (the very first object in the tree) in the project navigator and you'll get a view with project settings on the right and targets on the left.

Click on the top level item in the left hand project view - it will show you the project and the targets in the main pane - along with their configurations

No, targets and schemes are not the same thing. Your targets are still there: in the navigator in the left, click on the Project icon (it says "1 target, iOS SDK 4.3" or something similar underneath the usual .xcodeproject icon). THe main view now shows the project editor, where you can see and edit all your targets.
Schemes are basically ways to aggregate targets in useful ways when performing common actions like building and testing.

Yep, they are inside "Schemes" now. Each scheme can contain differing targets/build configurations.
If you click the dropdown and choose "Edit Scheme..." where your targets used to be in Xcode 3, then click "Run AppName..." or "Test" in the left side tree, under the "Info" tab you'll find the Build Configuration dropdown that contains Debug, Release, etc. in addition to the target Executable.

Related

How to make Xcode Archive use the right configuration information?

My Mac app has two Targets. When I attempt to Archive the second Target, Xcode always uses the configuration info for the first Target (Bundle ID, Version, and Build) even though I have selected the second Target.
By configuration I mean the "General" options displayed when clicking on the project name in the Project Navigator.
I was using the wrong scheme (whatever that is). To set the right scheme, use the Scheme menu (just to the right of the square Stop button on Xcode's menu bar).

Xcode 11, where can I manage Build Phase?

I've migrated my app into Xcode 11.
I want to remove legacy resources that copied at Build Phase, but I can't find old Build Phase menu.
Please make sure that you have selected Target instead of Project.
The problem is that you have the project selected (in the "project and targets list", which may be a collapsed pane for your Xcode).
So first, make sure the button to the far left of the "Info" tab shown in your screenshot is toggled on (so you can see your project and targets list).
Then simply select a target. Now you'll see the Build Phases tab. Only the targets of a project have build phases.
Note: If you don't like to keep the targets list shown, you can simply use the popup menu next to the pane's toggle button - which appears when the pane is not shown - to toggle from project to a target.

How do I embed projects using Xcode 10?

I've been searching the internet for hours trying to figure this out. In previous versions of Xcode, I could drag a .xcodeproj file onto my workspace, and the groups, etc. of that project would be in the main one. That is, its sources and products would be accessible in the parent project. I mean to do this for a new private framework of mine, but it seems that in Xcode 10.2.1, this behavior is changed.
When I follow the instructions found in Apple's archived documentation (all that seems to survive), the .xcodeproj file sits alone in my file inspector. No reference hierarchy, and nothing happens when I click on it. On top of that, that project's frameworks are not accessible to the parent project.
Has anyone here figured out how this changed in Xcode 10, and what we are to do about it now? Many thanks!
This certainly feels like a workaround, but it does seem to work:
Open one of the projects you want to be in the final workspace
From the "File" menu choose "Save As Workspace…" and save it somewhere on disk
This will create a new workspace that looks identical to the Xcode project you originally opened.
From the "File" menu choose "Add files to “WorkspaceName“…" and select the next project you want in the workspace
At this point it will probably put the newly added project "inside" of the existing one in the file navigator pane. Simply drag it out to the top level and it will be on the same level as the original project. You should be able to twirl open the disclosure triangle and see the source files it contains. Clicking on the project will show the targets it contains.
Repeat as necessary for the remaining Xcode projects
As you add projects, the schemes from each project will show up in the popup menu under the scheme button in the toolbar.

Build Phase Tab Hidden or Missing

I'm probably asking a very elementary Xcode question, but here it goes. My layout has no 'Build Phase' tab. I might have inadvertently changed my layout. A lot of tutorials state that you should go to the Build Phase tab and link to a library. Well, I've Clicked on the Target, and the File under the Target, Searched the Toolbar, searched the project settings, Info. When I right click on the Target File I get a list including "Copy Build Phase" and Add Build Phase, but that's not giving me access to the Build Phase Tab. I've tried 'reset to default or factory layout'.....Build Phase Tab. How can I display the layout with a Build Phase tab in the toolbar, and save it to utilize in my projects? By the way I'm using XCode 3.2 maybe it's a version limitation?
It sounds like those tutorials are for Xcode 4. For your version, if you open the target in the sidebar, there should be some groups. Those are your build phases. Just drag the library into the one that says something like "Link Executable", or click the checkbox to add it to your target and it should go there automatically.

xcode 4 list of files with target

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:
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).
I also find this lack of a checkmark list annoying. I did notice that you can add multiple files to a target via the + icon at the bottom of the compile sources list in the "by target" method.

Resources