Re: Faster adding of files to targets
Re: Faster adding of files to targets
- Subject: Re: Faster adding of files to targets
- From: Greg Guerin <email@hidden>
- Date: Mon, 5 Oct 2009 22:58:42 -0700
ML wrote:
But the source is already in Xcode and the targets came over blank.
Plus the source is nested in many folders.
Is there a way I can edit a target in a text editor and paste in
the list of files as I was given a list of what files are required
for each target.
My firs thought was you might be able to script it. Just a thought.
It may not be practical, or it may take more time to write and test
the script than it does to do it manually. I'm assuming this isn't a
task you expect to repeat.
My second thought was you might be able to do some careful clicking.
If all the source files are added, but they aren't assigned to any
targets, try the following. I just tested it in Xcode version 3.1.2
(Leopard) and 3.2 (Snow Leopard). I'm pretty sure it works on
earlier Xcode versions, too.
Refer to the left-hand column, where the outline view is labeled
"Groups & Files". Right-click the "Groups & Files" heading, then
choose "Target Membership" from the contextual menu. A column will
appear on the left.
Now choose as the Active Target the target to which you want to add
source files.
Next, expand one of your source groups so all the files are visible.
In the left-hand column that appeared when "Target Membership" was
chosen, you should see a checkbox for each file. If the file is a
member of the target it will be checked, if not it will be
unchecked. So simply go down the list and check the box for every
file you want added to the active target. I would try grouping the
files in a logical order by target, if possible, so expanding or
collapsing a single group-folder shows or hides all the relevant
checkboxes at once.
If you change the active target to your second target, the checkboxes
will change state to reflect membership in that target. Again, go
down the list and check or uncheck the membership checkbox as needed.
There is another pane to review target membership.
First, select one or more groups of source files (yellow folders).
Right-click one and choose "Get Info". Choose the Targets tab and
you'll see a target-membership table similar to the column of
checkboxes. I mostly use this view to check my work from the Groups
& Files outline-view, rather than as the primary way to add items to
targets. I also find it useful for removing multiple files at once
from a target.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden