Re: Projects and Targets
Re: Projects and Targets
- Subject: Re: Projects and Targets
- From: "Simon Raisin" <email@hidden>
- Date: Fri, 10 Aug 2007 07:00:25 -0400
Thank you, everyone, for your responses.
I had a feeling that a single project with multiple targets was the way to go.
I guess I started questioning myself when I began trying to add targets to an empty project. The "wizards" didn't seem to do much. For example, say I create a new, empty Xcode project, named "MyProject".
Now I want to add my first target, say a Cocoa preference pane target. So I add a "Cocoa - Loadable Bundle" target, "MyPrefPane" (if I were creating an entirely new project I'd have access to a wizard that would take care of everything for a preference pane project).
So, and this is more than likely just my lack of familiarity with these tools, it appears as though I'd have to create MyPrefPane as its own external Xcode project, see what gets generated, then attempt to replicate this back in MyProject.
Again, having to jump through these kind of hoops is what made me question whether I was really using the tool(s) as they were intended.
Any further enlightenment would be appreciated.
BTW James, I *do* have your book, and I *have* read through Chapter 13, but the lack of functionality in the "Add Target 'Wizard'" still seems to require a great deal of manual tweaking. Is this *really* the way this is supposed to work? If that is the case, I am very surprised that an "Import Existing Target" Wizard isn't provided.
Again, thank you for helping to clear up my confusion.
CxT
On 8/10/07, James Bucanek <email@hidden> wrote:
Simon Raisin <mailto:email@hidden> wrote (Thursday, August
9, 2007 7:50 PM -0400):
>I just finished reading the "Targets" section of the Xcode User's Guide and
>it appears as though I could simply create one "master" project and create
>targets for each the assets that are currently contained within their own
>Xcode project. It would be great if I could access all of my source code
>from one location.
>
>Q1) Is the the second option even possible?
It's more than possible, I think it's the recommended technique.
I have several projects that build multiple products. Some
produce sub-products (helper binaries, frameworks, plug-ins,
help files) that later get included in an application target.
Some produce completely independent products (i.e. a client
application and a server application) that just happen to share
common source files.
The best feature of this arrangement (in my opinion) is that all
of the targets share a single set of build settings, which makes
maintaining build settings across multiple products actually sane.
>Q2) What is the recommended way of handing this type of situation?
The biggest decision is probably how to organize your source
files. For overlapping products, I usually create a "Common"
folder that contains all shared source files, then separate
subfolders for the source files unique to each target. But there
are certainly no rules, and you choose the organization that
best fits your needs.
James Bucanek
____________________________________________________________________
Author of Beginning Xcode ISBN: 047175479X
<http://www.beginningxcode.com/
>
_______________________________________________
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