WWDC2004 Session 306
Transcript
Kind: captions
Language: en
gentlemen please welcome coco developer
tools evangelist Matt Formica I want to
welcome you to session 306 importing
development projects for xcode you've
heard a lot so far the last few days
about how to use xcode and many of the
new features of xcode but you may be
sitting here today thinking that you
realizing you've got a project in some
other environment that you're wondering
how you can get into Xcode in order to
take advantage of some of the features
that we've talked about or you may have
a lot of experience with another
development model and want to figure out
how you can leverage your experience in
Xcode to be more productive and that's
what the goal of this session is here to
talk to us about that today is actually
a Scott Tucker currently the legal
architect of Xcode importing technology
as well as other aspects of Xcode he's a
long term a long time tools engineer at
apple since the dawn of mac OS 10 so
here please join me in welcoming scott
tucker six pack so I'm one thing I want
to make clear upfront is in past years
we talked a lot about importing from
code we're moving people from cord code
word Xcode and we thought you know this
year that's not the only message yes
we're going to talk today about moving
from codewarrior to Xcode and the things
you have to watch out for but we're also
going to talk about moving from make
file based projects and based projects
PB whoa even from project builder so
this isn't just about codewarrior
anymore so what we'll cover today since
I'm for this session we're kind of
assuming most of you have not used Xcode
extensively or you could use it a little
bit but you're using other platforms
other development environments mainly so
we're going to go over the basics of
Xcode project model in the build system
then we'll talk about importing your
project and the different options that
are available there then once you've
imported your project that's kind of the
first step so we'll talk a little bit
about moving to GC seeing some of the
pitfalls to avoid there
and finally what you can do in Xcode to
not only make Xcode more familiar but
make your own workflow more powerful by
leveraging some of its features so let's
talk about the project model the core of
the project model is references in
groups references and groups references
are used to point to files or folders on
this you can use relative or absolute
paths and there are different relative
path types available for example we have
project relative or what we call the
build product relative path you know
relative to where your build products
are placed and there are a number of
others and you can even define your own
and I'll get into that in a second we
also have groups groups are very similar
to a code worries idea of groups if
you've used code where before it's a
hierarchy that's independent of the file
system what this means is that I can
have a group and it can point to a
folder on disk but it can also just be a
totally logical construct this allows
you to have organization within Xcode
that's independent of your file
structure gives you the freedom to
organize your code how you want to see
it in the project now I should note
Xcode unlike some other systems prefers
explicit references to files that are
used so there's currently no support for
recursive search paths and we do prefer
as I said that all files referenced
including header files are in the
project source trees so this is
something we added with Xcode 1 point 0
and what this allows you to do is define
your own custom pass type so for example
I mentioned before we have project
relative and we have you know build
product relatives well we allow you to
define your own absolute or relative
path types and they can even you can
even reference other source trees the
main place we see this being used is
when you have a big bunch of code that's
outside a project is shared among you
know a number of different projects for
example power plant is one example or
cutie this technology is actually used
by default by the code where import or
whenever you import a project from
codewarrior we automatically create a
source tree that points to the metro
works code where directory for example
to find power plant files so you've got
all these files you've got all these
folders that's great but you want to do
something with them well that's where
targets come in targets describe how to
build products they consist of file
references and fold the references in
some cases and a set of build settings
and then we take we take all this
information and we most targets will use
that to generate a product products is
fairly simple it's just you know an
application a static library dynamic
library command-line tool bundle etc now
I want to talk a little bit jump back
for a second now I mentioned products
well it may turn out especially in other
environments that you have your
application split across a number of
different projects and you actually like
this for a variety of reasons we can
actually support this in Xcode because
we have what are called cross-project
references this allows you to refer to
targets and other projects for purposes
of dependency analysis but it also
allows you to refer to the products that
that project generates so for example if
you have a bundle that needs to go into
your app but that bundles created
another project you can actually bring
in the project reference and then
directly say I want to take that bundle
and put it in my application this is
also I'm a technology technology that is
used by the code where importer and I'll
get more into that later so okay so
we've built something that well now you
want to run or debug it so in order to
manage kind of launch time information
setting settings and such Xcode has what
are called executable these provide the
ability as I said to run or debug
products they're automatically created
for targets that create executables like
a command line tool or an application
users can also create custom executables
this is especially useful to run or
debug executables outside the project
and where this really comes in to be
really useful is let's say you're
building a framework or a bundle and you
need some sort or you need to run some
sort of test harness with your code but
it's outside the project well for
example if you have the framework then
you can create a custom executable for
the app that uses the framework and set
it all up and then within Xcode you can
launch your application which is using
your framework it also lets you set up
multiple environments for an executable
for example if you have a demo version
of a nap maybe you want to set certain
command line options to change how the
app will behave and you can have
multiple executables so you can try the
non demo in the demo version finally I'd
like to talk a little bit about the
project format we get a number of
questions about our project format you
know can we read it can we munge it
outside of xcode so to start with we
have a single file package per project
and just for quick review a file package
is basically a folder that looks like a
file in the finder inside this package
we have two pieces of information we
have the project level data which is
stored enough the project pbx proj file
and that contains things that are common
they'll be seen by all users references
products targets for example then there
are user level data files these are
usually the user named pbx user these
contain things only that a per user and
only seen by the individual user for
example executable bookmarks breakpoints
you I configuration and I should note
the project file and the user files are
not meant to be hand edited we encourage
people to use xcode or Apple script to
make changes but I know someone will
last this so I'll just get this out of
the way right now if you would like to
see more of an XML style format or
whatever i encourage you to file bugs
and messages to xcode feedback to let us
know how you want to be able to interact
with the project file outside of the
xcode environment okay so let's talk
about the build system actually this
title is a little misleading because
there are actually three different build
systems we have in xcode this is almost
we're talking about the meta built
system because the three that we provide
our there's the Xcode build system which
we commonly call my native build system
the external build system which allows
you to access external build tools and
then the project builder build system
also commonly known as the jam based
build system and this comes from the old
project builder and it's there for
legacy reasons i'm going to mainly
talked about the native system and a
little bit about external build systems
today the choice of build system is the
target level so what this means is you
can have a native target and then you
can happen to have a native target that
build your app but you're using an open
source library that you link in
statically until you're using the
external build system there since they
have a make file and then for some
reason you also have another maybe
another target maybe you're doing
something also with Java and so you have
another target that's using the jam base
the nice thing is is that since this is
at the target level we have
infrastructure above outside of the
targets that allows us to set up the
tendencies between these types so you
can mix and match the different target
so okay so let's talk a little bit more
about products we actually track two
things regards to products that you
should know about one is call
of the build products location and the
others intermediate location the build
products location is basically when you
build your app this is where it's going
to go when you build your framework this
is where it's going to go intermediate
two things like 0 files intermediate
generated files etc going to the
intermediates location these locations
can be / you know per user per user per
project or per user per project for
build style but it's interesting I
didn't mention that they were shared
well the interesting thing here is that
if you have a number of projects for
example Xcode consists of several
different projects if you have all the
projects point to the same build
products location will automatically
pick up the version of say your
framework that's next to your app what
this allows you to do is I can make
changes for example to the devtools
interface framework and then run Xcode
without having to go and then run Xcode
against it without having to actually go
out and install the framework and try to
get this test environment setup it's
just all from with an ex-con it all just
happens so I strongly encourage people
who have you know applications that are
multiple pieces where you have a
framework and a dynamic library and
application to leverage this shared
build location because it's very useful
so let's talk a little bit more about
settings as you probably if you been to
the earlier sessions they talk much more
depth that I'm going to you today about
build settings but basically build
settings control the inner workings of a
build do I wanted to have debug symbols
optimization do I want warnings when I'm
compiling etc however we do have this
idea of multiple levels of precedence
for build setting and the higher levels
are going to override the lower levels
and since it's so important we get so
many questions about this I thought it
was worth going over again quickly so
you probably may have seen this grass
before so at the lowest level with the
environment variable things like dollar
path dollar home these are things we get
from the environment when we launch
Xcode and they're basically the lowest
level setting over that of the built-in
default settings these are things that
at the target level in our code we set
so for example we decide that dash OS is
the default optimization then there's a
target settings these are things that
you are setting so for example you might
go in and say i don't want dash OS I
want dash 03 by default for my target
then their build style setting build
styles are kind of like if you imagine
back in school you had the
transparencies where you keeping old lay
them on top of one another a build
sounds like a transparency it lays on
top of the target and any settings you
put in that build style override the
target so for example we have a
development build style and one thing
you might what you'll want to do is you
want to say well my development build
style I want to make there'd be no
optimization or dash 0 0 and then
finally if you leverage Xcode build our
command line build tool you can also set
command lines you can set build settings
at the command line that override
everything okay and talking and so
overriding target settings so build
styles as I just said we're used to
override target settings one of the key
things to remember here is we have we
have the macro dollar per end value and
this isn't value you replace it with the
name of the build setting this is
actually delivering value and it's used
to refer the setting value from the
previous level and so now I want to show
you a demo I can get the demo machine
one of the things we're commonly asked
is we know I came from codewarrior and I
would like to put my debug in my demo
one thank you I'd like to put you know
my my relief in my debug in different
locations and m4 and in patch releases
this has been actually not as easy as it
should be 6i let me resize it a little
bit i'm going to show you how you can
how you can easily set up though now
with 15 and get not only your debug
version in your optimized version in
separate locations you can also provide
different names for each and you can
also do preprocessor macros for each so
the key here as we said before is the
build style so for example here we're
looking at we have to we have
development which is you know debug and
deployment release and so you'll notice
here we expand this out and see if i can
get a little bit more what I've done
here is that we have this this setting
the development build products path this
is basically the shared build products I
was talking about earlier and so what
I've done is I've said well take the
default value and add / debug so I'm
creating a debug folder in that general
location the other thing I've done
I've changed the product name I've said
we'll take the product name value and
append debug to it so in this case we're
looking at sketch it's a simple small
program will get sketch of debug and
then finally I want to say oh well you
know there's some debug code I want to
run so let's take the previous value of
the preprocessor macros and append debug
to it and then in my deployment I do the
same type of thing except in this case I
don't have any preprocessor macros I
want to set I just sent the development
build products path to have / release
append release to the product name and
one thing I do here is that I turn off
using the deployment location because in
this case I just want to have my
optimizing alongside my debug I don't
want to create a route that I'm going to
install later so there's one more thing
and this is what i actually discovered
last night one of the problems you have
is if you try to do this just what we've
done so far is you'll find that you load
the you load the application but never
fully load sounds like yeah why isn't
this work well it turns out that the
info.plist for applications needs to be
set up properly and in 15 one cool thing
you can do now is you can actually put
in the you can actually put in build
settings in your info.plist and they'll
get evaluated properly so for example
thank you I didn't do the work but
someone did obviously you can put in for
example product name and a really cool
thing is is that it gives you what the
build style will give you I mean it's
everything's working the way it should
and so let me just I'm not going to
build this here but I just want to
launch to just show you guys that you
know this actually is real all I have to
do I don't have to create oh and the
cool thing is you used to have to create
you know custom executables to manage
all this all you need to do is just adds
a build style here add these flags and
then for example if I build and go and
then you'll notice down here sketch
debug and so for example you know I put
in some code on what was it top edges so
you see here i got this may be a little
hard to see but i got this this little
NS log here you know ran align top edges
so let me terminate that because
appointment
until here sketch release well let me
try the same thing just to show that
it's actually you know no log so here
we're showing you an easy way to have
separate locations for your different
variants of your targets we're showing
you have different names so you can
easily tell from the docker from the
finder which is which and finally how to
also set up the preprocessor macros
because many times that's exactly what
you want to do so oh one final thing I
should show this to this is really cool
actually I mentioned about the
executable it actually turns out that as
I change this if you read there's one
bug right now that but if you reopen it
it will actually yeah oh if you reopen
it it actually refreshes properly so now
you no longer need to and 12 you had to
set up your own custom excuse that no
longer needs to happen the only caveat
currently and this is steph will work on
for 2 point 0 is that our products
currently don't automatically refresh
when they should and there are some
issues around if you have multiple
variants and you want to copy those
products to other targets we need to
work through but for most of your usages
this should work fine and unfortunately
i figure this out last night so it's not
as a village but i'm going to work with
matthew Formica to get up some sort of
techno tour example so that everyone can
see how to do this so there we go if we
can go back to slides okay so we talked
a lot about the native build system
let's talk a little bit our external
build system our external build system
support mainly comes through one thing
which is the external target target it
delegates build responsibilities to the
external build system so you know if
you're using make this means that make
gets to run your bill that it's
responsible for the dependencies etc
it's you can still use xcode to edit
your files you can still use xcode to L
show later to you know to run to debug
all this means is that the build portion
is now being paid by handled by someone
else so you can also do the opposite
thing let's say you just have some extra
tools that you want to get into your
process you can use things like the
shell script build phases and the copy
files build phase to integrate these
tools into Xcode there's also one that I
forgot to mention on here
launders would kill me I forgot to
mention build rules this is another way
that you can integrate external tools
into your process and I'd encourage you
to go look back at the increasing
productivity Part two session where we
talked a lot about the build system how
to do exactly these things so now we've
talked about the project model we talked
about the build system let's talk about
actually getting your project into Xcode
so there are a couple of different types
going to cover here you know first we
support bringing codewarrior pro we
support bringing in project builder
project folder whoa and also I put make
file based projects make files in quotes
because it's anything that's make like
really and even more than that but the
common ones are make and AB jam if you
use it but anything really on the
command line you access from the command
line you could make work so code where
Pro code word pro works with code where
pro eight point three and nine point X
it supports importing reference projects
it supports importing most code where
target types that are relevant so for
example we're not going to bother to
import types that build o 68k or build
68k CFM what we do focus on its things
like the carpet we will bring in carbon
CFM target and just create you know
macco the relevant majko equivalent will
bring in the Macchio target etc the too
noticeable admissions at this point are
red targets and Java targets converted
projects use the Xcode native build
system and the overall structure of the
project is preserved although we will be
at we will add some files we won't
remove any that are still relevant
source code however across all of our
importing there's one key thing source
code is not modified this is not about
locking you into Xcode this is about
getting it over to Xcode and still being
able to use your code warrior project at
the same time so that you can make the
transition more smoothly if you need to
jump back and new for 15 and later you
can now script importing projects in
applescript and specifically code word
so now what I'm going to show you is
just a quick example of kind of a
comparison between the code warrior and
the Xcode project
so if you can switch to the demo and one
thing I'm going to do just to kind of
show off another feature I'll talk about
later is I'm going to use the condensed
workspace so so I've taken one of the
code warrior examples here and just drag
this down to the total your IDE so for
example this is power plant this is one
of their power plant examples and so you
know for those use code where this is
going to be boring i'm sorry but i just
want to give a little bit background
here so you notice they have files you
know the files and folders the files at
em finally yes so files folders then you
also have your targets you have your
link order and then for a given target
they have the active target there you
know you can have your setting so just
to give kind of compare and contrast
just to show you what happens this is an
example of a project that's already been
imported so let me move actually this
guy over here and let's put them on file
so you notice that our condensed
workspace looks amazingly similar to
code work but what I wanted to go over
it wasn't so much of a look but just
what we actually bring in so for example
you'll notice we keep pretty much the
same structure there are though a few
important things to note for example we
had this imported files group you notice
wow there's a bunch of headers in there
and various files as i said before
codewarrior uses what code where uses
recursive search paths and they don't
have you include headers for example
xcode really really wants to have those
headers in the project and it works a
lot better if they are so when we do the
import we act the reason actually
importing takes as long as it does is
that we actually go through scan your
code and figure out all the headers we
need to bring in and so for example
we'll add just general ones and imported
files but for example if i go to PP
actions you'll notice well here's a
header file how'd that get there will
actually look and see well if we find a
header file is there an associated see
file already if so we put it in line
with it now here if you go to the
targets you'll notice that I've created
a power paint PPC target so this is just
bringing it over we do bring over some
of the settings I'm not going to go into
details about which ones but we bring
over all the ones that that are relevant
to the project however we also provide
defaults that are more appropriate for
xcode in some cases and so here's your
target and then we also as I said before
you know and executables automatically
generated
now one thing is that you'll notice here
well we don't have a link order well so
how do you manage link order this is
something that you asked from time to
time it actually turns out if I go open
up the target and power create powerpc
we you actually can open up the sources
phase and in here is your link order for
all your C files so you can just
rearrange those and those will rearrange
the link order and then finally one
thing that Cobra doesn't have separately
I just wanted to quickly go over the is
the executor launch one point out you
know we have the executable here it's
something i'm going to show more in the
future demo but just the idea that in
code where you kind of look in one place
the target to set all this stuff
sometimes if you don't see something in
the target you might want to go look in
the executable editor executable
inspector to set some launch time
properties and so that's that so let's
go back to the slide okay so project
builder it's kind of weird to talk about
in this session because we actually
don't do any cool we don't do any
importing a project builder they just
automatically convert as soon as you
open there's no import process at all we
just upgrade the project file
essentially targets continue to use the
jam based build system this makes it
really easy you don't have to worry
about oh I've changed to Xcode and I've
changed my build system you can take it
in tiny baby steps there are though very
easy options to convert targets cheese
native to convert your targets to use
native targets the original and we can
do this either for an individual target
or the more recommended way these days
unless you have some java targets is
just to do the whole project since it
will then do all the dependencies
correctly in either case the original
targets are currently preserved so that
you can always fall back to the original
project builder whoa before project
builders project builder whoa we still
support importing most project types for
project builder whoa most sub-projects
are now as of 15 imported its native
targets however webobjects sub-projects
are still imported using jam based
targets as with all the other importers
project hierarchy is maintained external
build system project so there's no
direct importer we get lots of requests
you know can you make a make file
importer and then we think about going
back to college because that's where we
have
be to make it because it would take four
or five years but what we do allow for
is as I said before we have the external
target target so what we encourage
people to do is use the external target
target to wrap your external build
system you know if you don't desperately
need it to be in Xcode if you've got
this make file that people are
supporting like in an open source
project leverage the fact that we have
this capability so now one thing I
wanted to show is an ant demo so if we
can come back i'm going to show you how
to quickly bring in an open source aunt
project and for this one we will be
starring the all-in-one workspace so so
most people on the team know i'm
somewhat of a gamer I board game I play
games i have video consoles everything
so one of these I've been doing lately
is playing diplomacy online so I pulled
down this open-source project that
basically does help email players map
out diplomacy but you'll notice there's
no Xcode project here but there is an
ant file so what i can do is i can go to
xcode i can see new project and new with
15 you notice we have some ant base
template so i'm going to use the empty
project so let's see i want to call it
jdub and then i need to choose a
directory so let me go to come on that's
pretty like that try now now
interesting
there we go
come on
there we go okay so you'll notice for
example in the finder one and i have the
shade at that xcode file so the empty
project doesn't have much in it so what
i want to do is actually just bring in
everything so i'm actually in this
particular case i could just like a drag
watch I'll just drag it in so let me
just select everything but I don't want
you and I don't want the build directory
there we go quick tutorial on this we
get lots of questions about this you'll
notice this copy items just lets you
copy them into wherever your project
file might be in this case I don't I
don't want to do that the reference
pilots type in text encoding for the
most part leave those alone there are
some known issues there but in general
that it does what you want if you're
inside the project folder the one that
we get a lot of questions on is this
next one it says recursively create
groups we create folder references the
create group means basically we create
these groups that are logical and they
might be tied to the file tonight not
folder references basically say we're
going to create a reference to the
folder and then will dynamically track
what's inside of it but we won't create
persistent references for what's inside
of it in this case I want groups but
there are cases like when you have a
bunch of images or a hierarchy of
resources you want just dumped into your
bundle it's sometimes better just to
make a folder reference directly to the
folder and dump and copy that directly
in because that way you can add
references inside that hierarchy and you
don't have to go edit the project later
so there we go there's all my stuff now
it turns out that i'm when i was looking
at this let me just open up the default
really isn't what is this is the one
source code change i have to do to make
this demo work I was really bummed
because I was hoping I do it without
making any source code changes but it
turns out their default action isn't
what I want what I want to do is I want
to generate a jar so I'm going to use
their gift option so then let's know so
let's just scroll up in fact we can just
close this all out because I don't have
to do any more source code changes all I
have to do two things so I actually
don't even have to do any target changes
either this is the external target
target and it's already set up to use
and so you'll notice here we provided a
build tool and we spread some arguments
the action is basically you can see
their informational text we will send
down the action clean build install etc
and so there's nothing that needs to be
changed here but I do need to create a
custom executable if I can just remember
there we go so what I'm going to call
this one is I'm just going to call it J
dip and it turns out what we want to do
here since it's just a jar file it's
just to use herb in Java so there we go
and so this is the executable inspector
you notice here i have my executable its
youtube in java i can have some settings
here i also want to cut some build
directory which is leave it ajar disk
and then the other thing i can do is i
can set up one argument here and let's
do dash jar she do char because it
actually turns out that for whatever
reason j dip has this nasty dependency
on the Common working directory so I
need to make sure my common working
directory set up but that's pretty much
all i need to set up and so now if i go
to say building building go and let's
bring up the little panel you notice i
had it previously pre-built and in since
giant ant it's kind of cool in that it
notices this stuff and doesn't rebuild
stuff and out so now it's coming up and
we'll see if i remember the correct path
and everything and there you go now
we've got something up and that was what
like five minutes bringing a java
project and just to be clear I mean we
quit this you know I haven't done I've
done like five minutes let me go back to
here and if I was to go to say let me
bring up like the activity viewer so you
can see okay well we're done we're done
indexing but let's bring up like the
class rather come on you know just like
we've shown before you get all your
getting the index is populated you're
going to have access to all the job of
information all that's being done here
is aunt is taking control of your builds
you're still gonna be able to run it
you're still going to be able to debug
it it's a very quick way to get into
Xcode very cheaply so why don't we go
back to the slides oh but Scott you say
you don't have my IDE i'm using visual
studio i'm using something something
that's not here yeah we can't do
everything we'd love to but it just
doesn't happen overnight so the best
thing to do at this point is do
something similar to what i did with
ants it's create a new project create
add new targets if needed and dragging
the relevant files and just kind of go
from there if you can using external
build systems when you're dealing with
some of these other IDEs especially when
they're make based or make like is very
powerful in the recommended way
so you've got your project in there
especially if you're selling like
codewarrior well now you have to deal
with a compiler change you used to be
using mwc see now you're using GCC so
let's talk a little bit about moving to
GCC and some of the pitfalls you might
encounter so GCC has the different
Heritage's and other compilers it's open
source for one it's also been really
focused on you know portability and
compliance GCC in many cases is stricter
than other comply compilers which makes
sense because the compliance so one can
and then one thing to note is when
converting you'll get a lot of errors
you get oh my god till later but what
you'll find out is that there's just a
few common constructs a few common
patterns that you just need to tweak and
that a lot of them will just go away not
saying there won't potentially be some
nasty things you have to deal with but
for the most part it's all very just
simple changes so some of those simple
changes talkable bit in the past you do
things like ifdef em works to specify
mac OS 10 code don't do that use things
like ifdef Apple cc or or something more
appropriate to specifies the compiler
you're working with for example use
apple CC when you're specifying GCC only
code it's still appropriate to use em
works if you want to support both
compiling with Metro works and compiling
with app with GCC but it's not but to be
clear it's not appropriate to use that
to indicate what platform you're on okay
this is kind of old hat but don't
include universal headers you know
things like Mac Windows @h directly use
framework includes instead trust me the
mac windows out h on the system that's
there for compatibility is just going to
do the carbon-carbon dot h anyway so
you're not that you're not saving sure
of anything including universal headers
don't assume that in lighting works the
same way between your compiler and GCC
use things like dash f in line limit to
set the maximum size of functions that
will be inlined this is very important
you know the inline rules are different
like especially between code word and
GCC be aware of that and we'll talk more
about some documentation later that you
can read through to talk that talks
about some of these things don't rely on
pound pragma support in GCC currently
it's just not there there's some stuff
but not as much as for example within
codewarrior try to use / build file
settings instead where you can't don't
rely on the sides
bull note that the sizable is four on
four bites on GCC but one for example
codewarrior and windows so if you want
to make truly portable code don't rely
on the fact that a bull is only going to
be one bite don't assume that true and
one are the same value across compilers
and defined statements use things like
to find fubar one and then you know if
fubar to get the correct results across
compilers okay so we've got your project
in we've talked about TCC a little bit
let's talk about how you can use xcode
now to make your make your your
experience with x so more familiar but
not only that let's talk to all so
briefly kind of highlight the
technologies that you can use to make
yourself more powerful by using xcode so
making xcode familiar new for 2 point 0
workspaces you saw three different
workspaces there i would strongly
encourage everyone here to take a spin
with the developer preview for tiger
play with the workspace to see which
ones you like which ones you don't and
for the ones that you like if you see
things that are missing that would make
it just that much better please file
bugs we do want to get feedback on these
workspaces and make sure they're working
for you so quickly what workspaces are
actually can we come back to the demo
machine for one second for those of you
who didn't go to the increasing
productivity one so we have the
all-in-one workspace which I showed
before and let me just I'll just use
sketch for all three so what this does
is allows you to have one window per
project pretty simple there are still
going to be some separate global windows
like the activity viewer but pretty much
when you're working your project you'll
be working in one window and currently
for right now you have to close projects
when you change to work spaces for the
seed but then I can switch to the
condensed project work space and let me
open sketching it you notice this is
much more much more compact you'll
notice that we have a much smaller
project window it doesn't have the
attached detail view it's designed more
for those people who like to have lots
and lots of windows and want their
project window to not take up the whole
screen to be very small
and then one of the things to on these
is that we've also made things so the
tabs actually will allow you to drag
around so for example if you want to add
this to a target you can just drag
things around which makes it's actually
a pretty powerful view and then finally
we have the old original workspace so
this is that what we call the Xcode 1.2
plus plus because we've added if we've
done a few minor things so for example
you'll notice here we have a separate
window for each task you also know we've
gone back to normal sliders and then in
certain cases for example only bring up
the find window you notice now we have
attached editors on most windows so that
when you do a find you can just do in
line you can do you find replace in line
without having to go between multiple
windows but otherwise this is very
similar to the to the xcode 1.2 work
style so so that's the quick to second
version of workspaces I strongly
encourage people to review the
increasing productivity Part one session
that was given on Wednesday that will go
into much more detail so if we can go
back to the slides real quick so that's
workspaces we also have key bindings
since one point 0 we supported key
bindings for bbedit for mpw codewarrior
you can also create your own custom key
bindings off of any of these if there is
a ide that you would like to see how the
key bindings for police file radars and
let us know external editors sometimes
you just really really like the editor
you're working with you don't
necessarily want to use the extra code
editor so we have support for BB edit
text wrangler sub ISA edit Emacs and
partial support for VI just a
clarification unless you see the two
point O bubble or the 1.5 bubble this is
stuff that already exists most of stuff
I talk about today is already existing
finally with text editing there's a I'm
about to do a demo I'm going to show you
some text editing things like we got a
lot of questions about oh I want to turn
off line wrapping or I want to turn off
indentation where do I set all this
stuff I'm just going to do a quick tour
to show you that stuff so let's just go
ahead and do the customized for demo so
if we can switch back real quick
so you sketch again shouldn't quit
so here we have xcode siletz oh actually
I don't want Xcode what I want to do so
let's start I out I talked a little
about workspaces a little bit earlier so
next thing I want to talk about is you
know the UM it's just jump real quick
i'll just show the keybinds real quickly
here's the key bindings it's in the
general press and as you'll notice
appear i'm using xcode default but for
example we also have vb at a compatible
metrics compatible and mpw compatible
you can also create your you can
duplicate one of any of these and create
your own custom key bindings set this
should just work as advertised if it's
not please put you know please let us
know and also if you like i said if
there are other sets you'd like to see
please let us know some sets are harder
than others i should point out for those
people are asking for emacs it actually
turns out that Coco has a number of the
basic emacs key bindings already in
place in case you didn't know but I
understand there are more complex ones
that you want so so the next thing I
want to talk about a little bit as file
types so we have this pretty weak we
have this idea of file types and Xcode
that allows us to you know say oh this
is of a certain type and those types can
get pretty specific so for example if I
want to I can get down to you know this
is documentation or I can go all the way
down and say you know oh this is a java
file res file etc I just want to show
real quickly though that you know our
external editor support the way it's set
up for example here you see oh it's
currently bbedit currently subia edit
it's not just one editor you get to
choose you get to say on a profile type
basis which ever you want to use so in
this case i like to use BB I to for HTML
but I want to use sub-ether edit to code
with so I can do some extreme coding you
know with someone in New York but just
to show how this works so for example if
i do java then i can then I can use
heavy sedative I want to do HTML it'll
launch speedy edit there we go yay so
look like that so anyway this is just a
really simple way like if you really
like bbedit we know a lot of people love
bbedit you know you can still use vb
edit go to town it just works it'll
notice when you change files it'll be
able to open bookmarks break points
except
we'll be able to open bookmarks to files
click on find results should just work
it should all just work and this has
been in actually since one point out
although i believe TextWrangler was
added more recently and then finally I
just want to talk briefly about text
editing so texting is the main part to
see all this stuff and so for example
some of the some of the common ones are
oh I want to wrap lines or not wrap
lines I want to show the column position
or I want to show line I want to show my
gutter etc we also have a page guide for
example if you like having a page guide
at a certain number of columns whether
the editor uses tabs or not and then
indentation here's our syntax are where
indentation and all the controls for
that and then finally just to recap for
the code sense in the function pop-up
that's all in navigation so let's go
back to the slides that should kind of a
quick those are some things that we find
people once they get those things change
suddenly they go from being really angry
too kind of happy and then they
eventually get you really happy when
they get to this next part so great now
Xcode works more how you'd like it to
work you've got a nice workspace you can
deal with you've made some changes how
you know how we layout files that you're
happy with but to take it to the next
level we've got a bunch of features in
Xcode that'll make you more productive
SDKs you know now you can develop for 10
for you can develop for tiger on 10 3
you can develop for 10 3 on tiger fixing
continue being able to edit your edit
and compile your edit your code and make
changes while debugging integrated
documentation we have great
documentation support I mean it's
awesome you can get almost anything in
the ADC just directly from Xcode and
it's integrated even into your source
code so you double click on a symbol
that's in you know in cocoa or carbon
wherever will take you right option
double-click and will take you right to
the documentation distributed build
especially if you have a lot of machines
some of which aren't being used this is
a great way to utilize idle processor
time to make your builds faster don't
just use your own machine use everyone
else's machine to at CM integration like
we said earlier we've added support for
subversion so now we support CVS
perforce and subversion and they're all
integrated the same way you don't have
like different you eyes four different
systems command line build support
xcode bill it's a great way to do
automated nightly builds or provide
scripts that allow you to automate your
process so you're not always having to
sit in front of the IDE just to get a
build out and finally Xcode is Apple
scriptable it's not fully there but
we've added the beginning so you can do
things like build you can modify
projects you can look at properties and
we definitely like feedback here what's
missing that you want because we want to
make this really usable so that you can
use it to make yourself more productive
and spend less time having these mundane
tasks so in summary so in summary moving
your project to xcode is easy for many
cases it's automated for example code
warrior project polar project / whoa
other projects need some more hand
holding it he may have to be imported
manually make aunt Jam and as we said
you know Visual Studio other other
systems you may have to develop manually
be aware of compiler differences i went
over just some high-level items there
but you know what i found i used to work
on what's called the dt SWAT team where
we would help people move over from code
word xcode from mac OS 9 i'm a question
etc a lot of time was spent with the
compiler so don't just you know the
import is the first step respect the
fact that you're going to be moving to a
different compiler and there may be
differences if you're already even if
you're already a unix program respect
the fact that you are moving to a
different platform don't just assume
that it's all just going to come to get
you know she's all magically going to
build and then finally once you've
gotten there once you've got something
that's building xcode is easy to
leverage you know you have the
flexibility to adjust xcode to how you
want to use it but it also provides you
the power to improve your existing
workflow so that you can then go and
make those xcode and you know make those
improvements so that you're running even
better on mac OS 10 so you can take
advantage of things like altivec and in
searchlight and WebKit etc so some
documentation i mentioned earlier of the
first thing obviously xcode help it's
right up in the helpline use the first
item xcode help this will provide your
documentation on how to use xcode that's
the first place you should probably go
when you have a question about how
something works if you're moving from
code wary to xcode we have some awesome
documentation about moving from code
where to xcode it's in the installed hi
your docs on your system also porting
unix and linux applications to mac OS 10
and then finally the mac OS 10
technology overview i strongly encourage
everyone to read this it contains a lot
of basic information about how Mac OS 10
works you may think oh I don't need to
understand that now but it trust me
it'll go over things like file packages
and all the basics frameworks and just
give you a better feel for how things
work especially if you're new to the
platform so who to contact if you have
issues you talk to someone I encourage
you to contact matthew formulas with
coco and developer tools evangelist