WWDC2004 Session 304

Transcript

Kind: captions Language: en ladies and gentlemen please welcome coco and developer tools evangelist matthew Formica thank you everyone I want to welcome you this afternoon to introduction to Xcode many of you were at Ted Goldstein's keynote yesterday afternoon where you saw some of the new things we're doing an Xcode this session is going to continue that diving down a little bit further into how Xcode works and how you can use it before we get started though a couple points to mention a contest was announced yesterday an opportunity for you to bring Thursday evening to the Xcode table on Apple Campus your application building and running in Xcode this is more than hello world but bring your application to the Xcode area and you can sign in and you will get a free t-shirt the next code shirt the other point I would mention as we're getting started is there if you go to connect a calm there are some supplementary release notes about Xcode two point O associated with Ted's keynote in a disk image session 300 you can download those late late breaking news announcements as i said this session is about an introduction next code it's going to talk about some of the new features that we've added it's also going to give you an overview of the ide to help round out your knowledge of some of the errors you might not be as familiar with Xcode has been innovating very rapidly over the last year and the manager of the exco team is here with us to go into the details I'd like to if you could join me in welcoming mat for elec manager of the echo team thanks man things have changed a little bit since you were here last year so let's go into little information about where Xcode stands today actually since I can still see the audience show of hands how many people are using Xcode today in some management reform holy cow how many are using new version that you just install the tiger come on more thrill seekers all right so before we start threatening you with what's new let's talk about what Xcode is Xcode is Apple's integrated development environment for developing software on the platform going a little bit of detail about what it is but let's talk about what this thing is that you're using and how it got here last year at wwc we released a preview of a software on Jaguar and panther and we released the first version at the same time that Panther shift who's a lot of features fix and continue distributed builds 0 link number of great great features to help you get up to speed we released that one in October we follow that one up with one xcode one not one in december some bug fix releases improved sdk support trying to get you the latest and greatest just before christmas because we know you're all working hard right about then follow that up with xcode one not two how many of you have one dot to installed excellent one not two was what we like to consider to enhance performance release stability lots of polish on the IDE but what we're here today to talk about our two new releases and to be very clear we are talking about two releases Xcode 15 on Panther and Xcode 20 on tiger so you actually have two pieces of software on the DVD that you have with tiger comes a version of xcode 20 but we also have available xcode one dot five for you to run on Panther it's available for 80s on ADC sites for download also if you go to the labs we have disk images of both of these or you can drag them on your machines and go ahead and install them so for the thrill seekers that want to be on tiger we have software but for those people who want to stay on Panther we also have something for you to look at so x 1 dot 5 is a beta release includes a number of features faster editing a better support for indexing remote debugging a lot of other great debugging capabilities X go to 0 is the same feature set but includes a little bit more things like design tools things like workspace layoffs which we'll get into in a little bit so that's where we stand today let's talk about what this thing is we're an integrated development environment so let's let's figure out what that means let's take the environment first Mac os10 living on xcode 10 shift on Panther so it's moving on that and forward with sdk support though you can develop for any of the x10 releases for the platform lots of language support all the sea dialects java scripting languages like apple script and shell scripting lots of different products to whether it's an application your libraries your plugins your frameworks lots of different functional in its application and we're trying to cater to a lot of different people here but we're trying to do so in a way that makes it feel like but it's part of the platform so we're including things like user interface paradigms that you've seen all over the place search fields inspectors smart lists of things things that you're used to seeing and in very the ease of use applications the mac OS 10 or to bring those to you in the development environment to make it as easy as possible for you to work let's talk about development what does it mean to be development what are the things that we're including to try and make things a little bit easier for you to be development environment really requires a number of things first is workflow and management there are a lot of things other than source code and compiling things that that are really important to your daily life project organization project management dealing with conflicts from source source control management systems all sorts of big issues work slow where the buttons are how I get to them how I get to one from one place to another these are all very very key issues that we try to address an Xcode source code editing I want to edit my source code file but I want to do in a particular way I want a certain color certain spot size I want the buttons in the right place I want things that my fingertips are key bindings all sorts of different and intricate things that really are important to us as individual developers to get our work done but then also the ability to provide things like assistance and documentation we've got a wealth of knowledge a wealth of information that both about your product and the api's you're trying to use and how we bring those to you in a seamless and easy way is important to us as it is to you let's talk about some of these things first in Xcode to point out on tiger you'll notice some new workflows sonu what we call workspace layout Xcode has a traditional layout which you've all seen up until this point we've included a couple different ones to try and and give you the ease of use that you're looking for because we know that there's an extreme breadth of different different ways of developing I want to call it religious but in some cases it sort of is one of these is an all-in-one works workspace be able to have everything that you've ever wanted all in one window so per project you have one window you have four projects you have for windows but there are people that really would like something else and they want something that's a little more condensed but so they have lots of windows so a very very compact project view but having lots of editor windows or lots of other ancillary window to your project so we try and give you both extremes of lots of things or many things are very few things depending on who you are and you can see these in the new workspace labs in the 20 version other things that you can see our new attached editors so things like the build results window the fine window the ability to attach an editor to the bottom so that as you're in the middle of doing something as you're in the middle at work flow and you just want to see a file I just want to change one thing or scroll and see something you don't have to get out of that particular mindset of context you can do it right there customizable views things like being able to take the headers or the columns that are displayed in a certain place and do just the things you want or add things that you want for a particular workflow things like SCM above information to target management the size of code whether it needs to be rebuilt errors and warnings all sorts of things to allow you to customize the view to the way you work when you need it but also things like customizable key bindings I'm sure there are lots of people in here that love emacs or level particular program where it's all done right here you know exactly what if someone says build you don't think of an action you think of a finger stroke or some some way of grabbing the keyboard to do something that's important we love our mics we love our widgets but the ability to get something done to use that muscle memory is extremely important to us Xcode implements a key binding support to allow you to use key bindings from other popular applications or to customize the key bindings if you find something more convenient and you'll see that in a little bit but also simple things like an activity viewer this application does a lot of things build it finds it indexes and that makes julienne fries it does all sorts of things but how do you know what's going on providing something very very simple like an activity viewer to show you all the things that are going on give you the ability to stop them or change them it's very very important to us and so it's added that in the new versions over and above just managing your project and deal with some of the niceties it's it's getting into your project it's figuring out what I want to do or how I want to do it so Xcode includes the number of things like project templates and assistance help you get up to speed pick the type of application or the type of thing you're trying to build whether it's a cocoa application or an automator stage or any of these things just go ahead and grab one of the assistants and get up to speed very very quickly inspectors once you want you're looking at something you probably want to change things you probably want to modify values you probably want to tweak it just a little bit so that the name name looks a little different or at a different setting inspectors are very very familiar paradigm and we use them all over the place on xcode to try and give you that ease of use to make things very very familiar but also very very flexible listing information is very complex where you want things to go how you want things to be viewed can be very very difficult and there are things like the whole smart concept smart playlists in itunes they keep track of things you looked at last or mail folders the keep track of some heuristic we were doing this last year smart smart groups the ability to look at something based on a particular element whether it's a file name or the type of thing you're looking at whether it's a fine result or it's an SEM information smart smart things let x co do the work for you you just take the benefit of being able to go there very very quickly and take advantage of it when your projects get big and we know they do it's the ability to go ahead and search and find things filter things down get access to things it's that one file or that one method you can't find that you'll sit there for minutes just getting frustrated and then sometimes go to the terminal and use grep to find the file is in I necessary echo provides a lot of functionality to help you find things but find files find methods fine functions find the things that you need get to them quickly get on with your life once you get there though it's what do i do is it the concept of source code editing of providing you the ability to use different kinds of editors whether it's an editor inside of one window or lots of external editors in different applications using the things that you're used to in getting the functionality that you want things like file editing history we able to be able to go back and forth between a number of files very very quickly if you're looking an implementation file or a definition and go back to the declaration or pop between three or four files if they're all related these are things that are relatively easy to do and we provide them for you function pop-ups be able to introspect a source code filed show you what's in it give you a quick access to jump to a particular point in your file also things like counterparts and inclusions we know all sorts of things about your project by virtue of having it indexed we can show you things like oh I know where that other file is I know where the header is for this particular element or I know all the files that happen to include the one you're in so if you make a change here we make it easy to go to the other ones little tiny things intuitive things that we provide right at your fingertips even things like an annotated gutter when you build any of problems or errors and warnings we know where they're from we know specifically where they're from we make it very very easy to get back to those places get those things fixed and get on with the things you need I mentioned editor support a little bit we also have support for external editors popular editors like bbedit sub Aoife edit you can text edit if you like use those as your standard editor if that's your preferred method of editing your source code file but take all advantage of the rest of xcode allow you to use that functionality and work through your projects once you start working again there's lots of assistance we can provide and we've done a lot to take what we call code sense are really to take a symbolic index to their source code and provide a tool in useful ways one way you saw last year in xcode one auto is code completion the ability to take of a symbol rich information and say you know what contextually in my source code file I'm right here help me help me with this I don't know the method I'm looking for forget the function name I know there's a variable but I can't remember what it is the ability to provide that to your finger it I'm very pleased to announce that last year we mentioned that we're going to do it for all the sea dialects today we have it for java so all the java developers here you have code completion map also things like design tools if you're in a seesaw heads keynote yesterday saw the ability to take source code is you have and design it look at models of it take an overview of it not just from how its implemented but it's a management tool it's a design tool as a way to work with other developers and say you know this is the kind of thing I'm looking for very very powerful tools built on stuff that again we already know about your source code so it's not work you have to do it's just something you can take advantage of also things like something simple like open quickly we know there are lots of things on your system we know there's lots of places you want to look for things we help you with that by giving you the ability to specify you know regardless of what project i'm in i want you to look all over here to add 2x codes per view just a list of all sorts of things but you want to have access to so again make it very very easy to keep track of those things but make sure that they're right at your fingertips when you need them and certainly not least documentation we have the pleasure of having lots of lots of very very good and rich documentation on both our api's our tools and all sorts of different functionality and this is integrated into Xcode there's full API and full-text searching so you can type in whatever you're looking for whether it's a particular method or a particular class and find what you're looking for all the reference materials all the tutorials right at your fingertips with quick navigation with different keystrokes to get right to it from your source code but also the abilities new ability and the New Mexico releases of bookmarking it of waiting all the way down to the depths of the documentation being able to market and say you know this is important to me I want to get back here so we've included bookmarks in that but I think that's enough talking about some of the basic things let's just go through a quick demo of some of those project navigation elements so what we're looking at here is I'm going to open up a simple app it's called blast F and it's actually a java application so we're going to go ahead and open this up using the old the older style workspace just as an example here malossi it's divided into two main elements we've got the the outline view on the left hand side which lists a hierarchical view of your application or your project gives you the ability to structure your project in any way shape or form these are groups that you can create you can drag files into any group that you want to regardless of where they're on the file system allowing you to organize your project maybe the way you think about it not the way it's laid out on disk what you'll note that the needs that are some of the elements that we call smart groups the ability to do something interesting with content about your project for you things like errors and warnings spying results bookmarks other full smart folders that we create for you the ability to take this information and pry it your fingertips now as you click through things on the left hand side and the outline view they're going to show up in the detail view on the right hand side there's a flat table view of all the content that are inside those groups this makes it very easy to navigate and look for things whereas the hierarchy gives you structure allows you to compartmentalize things it also requires that you have lots of hierarchy potentially lots of hierarchy that where you don't want to find something that was way down at the bottom you'd have to go through and twiddle open all the folders and potentially close them all back up but with the detail view you just go ahead and select something and we'll show you the aggregate of the selection on the right-hand side so as I select different folders will start to see that the contents of those folders appear on the right hand side making it very easy to look at different kinds of things now this is particularly useful in these little smart folders we have down here which are actually folders we've set up to look at a particular type of file especially a rule that we we ask you to filter on in this case the first one is nude filed so we're just going to show the new files here on the right hand side the next one its implementation files and in this case I only see one unfortunately our default implementation file smarter filters on mah well I don't have that M&H I have dot Java in my application here so let me just go ahead and add a new smart group here to show you how easy it is to get something particularly powerful so I'm just going to go ahead and call this Java file and I'm going to change the pattern here to instead of being start nibbling start java and you see that instantly there are all the java files in my application or my project maybe I want to do something a little more interesting in this case the blasts app has a bunch of what are called smart elements so I can just use March star Java and there's a particular set of files now that may not seem relatively powerful with the ability to hone this down and say you know today I'm working on just these files there's spread all over across my project but I want them in one place I want them a simple place that I can go and get access to them make it very easy to go ahead and create those additionally we can actually save these on a per project or on for all your projects on a per-user basis so where you to find something you find really really useful you can go ahead and set this up once and all of your projects take advantage of it once we're looking at files though it's important to note that as I said before we're going to show an aggregate of the selection over here on the right hand side so as I were to select for example your interfaces here and then ctrl click and click on resources we're showing the aggregate of a selection so are showing the elements from both of these merge together now this is particularly useful when it comes to something like find so we'll just go ahead and open up the batch finds panel here in the project and I'm going to go ahead and search for let's search for something like smart so this is doing a textual search in my project and it found 58 occurrences and it's actually going to list all 58 over here in the fine window but also it's going to list them over here in my find results so it's going to keep track of finds that I've done before we get back to them very quickly and easily you can see here that's going to show you the line that the file that that particular match came on and it's going to show you the location so i can do a quick fine that way let's actually go to ahead go ahead and do another one let's call this one this is the blast tablets call it explode go ahead and do another search this is going to complete and we see that we had 88 occurrences again there's the results over here in my find results marker that I can view but now what becomes really compelling it's be able to select both of these at the same time and use the filter field that we have up here to go ahead and refine this content so i could go ahead and type in the word let's just do missile base here and we see that here are all the instances in files that match missile base that have either explode or smart them making it really easy to find the things you're looking for hone it down refine it get access to it change it and get on with your life so in addition to some of these file-based smart groups we also have things like project symbols so the project symbol smart group takes the contents from the symbolic index that we have about this project and shows us a list so i can scroll down through the list here of all the different symbols that are in this project and I have the same capabilities of being able to filter on it so I can filter by name and let's just go ahead again look for the word explode and apparently everything in this app explodes so I could search by name they may not be as interesting let's go ahead and take that out and change the search to search by something like symbol type and I can go ahead and type in something like class and get all the class methods very easily again quickly works through the vast amount of information we have about your project get you access to something very very quickly so again these smart groups give you access to information let's talk about doing something with this particular information let's go ahead and edit something so so far I've been working just in the project view of the outline view and the detail view here say we wanted to go ahead and edit a file well there's a number of different ways we can do that the first one is to use what we call the embedded editor I'm just going to drag up this little splitter here and you see that an editor window is right in the middle here and as I go through and select other elements from you know the list chair I can select different files you know that they just pop right into the editor so i can select as many as I want or I do want to go back to one of them I have this nice little history pop up here where I can move back and forth between different files and select the one that i'm particularly looking for next to that once we have a file we have something called the function pop up which revives you quick access to see will appear the methods in this particular file I can go ahead and select one of them and jump right to it be able to get right to the things you want right back to the things you need a feature that probably is not used as much as it could be by people as the ability to create bookmarks we do all the time in Safari which is all over the place you can do it in source code we've had it for a while and in fact that it's so easy it's the same keystroke as safari so command D I'm just going to go ahead and select a line here and hit command D you see a little sheet comes down and says enter the name for the bookmark I'll just put in front of here that this is a comment but maybe I want to go back and edit later scroll up to the top of the file and maybe put in another one where this is we'll just call this copyright go ahead and create that and now you'll note that I'm right here this is little bookmark pop up but I can now just move back and forth between elements in my source code files very quickly and very easily makes it easy to do things outside of your source code but get back to the things you want very quickly and easily for some people though this is not enough real estate to edit no matter how big I make this or I want this I want something a little bit different so in addition to providing the internal editor we can also provide a separate editor I can go ahead and double-click on a source code file and you note that it pops up in this separate window I can go ahead and do that for a number of other files just bring up as many files as I want here and I can get all the windows that I could ever possibly want but now comes a big question how many windows are too many at this point we have force for windows for editing and then screens getting a little bit cluttered so we provide you the functionality to tail your workflow in such a way that if I close some of these other windows and go back to the first one I see that I have a little tiled editing mode button up here when I click it it becomes a single window such that if I go through and now open some more files you'll note that they all appear in that one window so we allow you to say whether you want all of your stuff in the project window you want all your stuff in separate windows or you want one separate window to put all of your source code in making it easy to move back and forth between different pieces of source code so now we've got source code let's do something interesting with it so as I've mentioned before we now support code completion for java so little here's a little bit of java code in the arrow based class i'm just going to go ahead and just going to move this code down a little bit get myself some room here and say that i was just typing this for the first time so pretend this doesn't exist here but use this as a reference for what I'm going to start typing in I could just go ahead and start typing you know game piece and you see the ability to not type when you're up on stage is pretty prevalent so what I want to do is this next in its next case let's say all right I have this this arrow element I should I should kneel the type I feel use something I know about this by the virtue of the fact that the project knows all kinds of things about the aerial class so i could just go ahead and hit the code completion key and it's going to go ahead and bring up a list of things you'll notice the bottom of the completion pop-up it says game piece it knows what type it is and it's showing me things that match that in this case it's showing me all the elements that seemed appropriate based on the letter i that i typed in in this case what i want is being knit king in this in Game method so i can just arrow down or i can use the mouse to select that it's going to automatically select the placeholder for me and i can type that in i can also do something like the next one where i know that the arrow also has a lots of set methods and i can go ahead and set the velocity and in this case it's a new and a size but now i might get here and realized you know I don't know what I don't know what a menace size is I don't actually know how to use this at this point we can use the fact that we have lots of documentation lots of API reference to figure out what these things are we also have two key strokes that are particularly useful but I think most people don't realize it first but once they do feel like they can't live without those our command double-click an option double click if I command double click on NS sighs what it's actually gonna go do is bring up a list of all the things in the symbol index that match that and allow me to go ahead and select one and take me right through it in this case it's not necessarily very interesting the implementation doesn't really do very much here so let's instead do an option double click which is going to bring up our documentation window automatically put NS size up here in the upper right find some matches and automatically show me one of them and that's the one I'd be looking for would be the Java reference implementation for NS sighs this is a very very handy window if you've never used it before I implore you to go ahead and grab the help menu and pull up the documentation the ability to look based on groups ability to take my search and click on a library and refine that search to that particular set we were looking the driver's wheel looking Java and refine this search but also the ability to change my search from in this case we're looking at AP is maybe I want to do a full text search of anything that has anything and everything to do with NS size so go ahead and enter that hit return and we're going to go ahead and search all these locations doing relevant searches on all the content here would actually want to go down and pull up a particular class I could say ah this is the one I've been looking for for so long I could just go ahead add a bookmark to it and it's going to pier right there so allows me quick access to go back to it later full suite of documentation right at your fingertips very very easy to use so you've seen some code completion let's talk a little bit about indexing in general you've had a lot of feedback on indexing we've listened we've done some things about it we've given you code completion for java we've improved the indexing speed in general and our accuracy in our parsers but probably the most request feature we've put indexing on a background thread so now as we parse your source code that's all going to be done on a background thread it's not going to interfere with you it's not going to bother you go ahead and go about your daily work when the index is done you won't even know it because they won't even have been bothering it but we've includes improve the speed in general and I'd what I'd like to do is show you an example of how that looks so what I'm going to do is I'm actually gonna bring up something I mentioned before which is the activity window I'm going to sit down here in the lower right and the activity window is going to show me things that are going on in my application now in this case what I want to do is actually show you the indexing so i'm going to go ahead and bring up the project inspector and i'm going to go ahead and bring up the code sense tab and you see that there's this local button here called rebuild index now i'm sure most of you are sitting there going he's talking to press that easy he's not actually going to try and rebuild a java index for a project on stage AZ that takes forever doesn't it if it's going to work for you it's got to work for me up here so i watch the activity viewing the lower right i'm gonna go ahead and click rebuild index it's going to ask me if I really want to do this do I so I'm going to go ahead and click okay we're gonna see the project in your sis starts up and wait that can't that can't have worked let me go back here to my project symbol just make sure that well we actually do have project symbols we seem like heaven before let's just make sure let's look it'll pull up the class browser here this will be the true test well we've got the class browser here let's make sure we do have the well yeah we did you have all the JDK information all right so to prove you that this is not sleight of hand this is not I'm not making this up I'm going to go ahead and disable indexing from a turn this off and you'll know that both of these windows go away Todd's I no longer content I can't Coco complete I can't do anything because i have no more index so now i'm going to go back when the activity wind over here to the front go ahead and click on enable indexing and see that the project in dexter starts up and all lo and behold there was my project symbols i can go back here and again i'm not making this up so there's the jdk now to be honest this is using a lot of capabilities of Xcode we have index templates we have updated parsers we have all sorts of things that make this possible but indexing should no longer be a burden on you it should be something you guys all want to use all want to take advantage of one final thing I want to talk about with just general workflow is the ability to set key bindings an off or a seldom-used control panel or a preference here is the key bindings the ability to go in and select the key binding for xcode or for another ide and be able to go through and set things here all the menu items and hear all the key bindings the ability to go ahead and double click on one of those and set it to whatever you want I would encourage you guys to go ahead and look here because it also shows you a list of all the things that are available in Xcode all the different functions all those features customize it to your will make it the way you want very very useful feature so that's just a quick overview of some of the project management and navigation elements let's take a look at some of the other parts of Xcode I would implore you that there's an East increasing productivity session tomorrow in this very room at two o'clock which goes into a lot of these details one of these elements rather and much much more detail so it encourage you guys to come to that if you're interested in this content we talked about the environment we've talked about development let's talk about integration because that's what Xcode is about is integrating all sorts of really great features into an IDE there are all sorts of things we have to pull together to make the development possible build system debugger source control management tools profiling tools these are all things that we can add ins and leveraged from our platform to give you advantages to give you things to get your work done the first one is an integrated build system this is kind of key we have a system that takes a project model and implements the idea of targets targets are instructions or sets of things to create something or do something and we have lots of different support for different kinds of targets we spent a lot of time creating something which we call the native build system native support for creating projects native being that we meet control things we have lots of ability to do really good dependency analysis and give you all sorts of benefit we have support for the same jam targets that project builder had and we also have external target support for things like make an ant the ability to do something outside of xcode would still take advantage of the xcode build system and there are all kinds of different aspects of the build system where you have products and executable lots of different ways to customize your application customize your project to get the things that you want a good deal is a build system is customizing it to suit your needs to do the things that you want the ability to take and inspect settings both on your project on your targets set compiler options that build flags and coatings on files get the things that you want in the way that you want them and we'll take a look at some of the inspectors for this in a little bit but there are lots of lots of different features to the build system that provide lots of great functionality as I mentioned before that's the ability to provide you inline errors and warnings to show you in your source code where things are going wrong allow you to change them and keep them back up to speed get your application running again smart groups of errors and warnings to keep track of those things as you make changes but even a detailed build log for those who like to live on the bleeding edge to see the absolute honest truth of what's going on and filters through all the content to see exactly what's happening with your application the village to manage source trees working between applications and saying here's where my all my sources are and I want to manage this across a number of different people even though we have different structures on our machines shared build locations so I can build something once and everybody can take advantage of it or I can use it across multiple projects and the ability to use SDKs the ability to say I'm on this platform but I want to build for a different one very very powerful very compelling feature but in the end it's all about performance it's all about saying you know this this is the heart of the matter if it takes too long it's not useful not helpful and what we've tried to do is implement a number of features to give you the green light to make sure that for build performance is not an issue for you so the first one of these is sportful precompiled headers the fact is we no matter how big our applications are the amount of information we're pulling in from other resources from frameworks and libraries out Lazar's by perhaps an order of magnitude or more our applications are this small when you compare it to all the stuff that's being compiled in there the ability to freakin precompile us and say you know i know i'm going to need them why wait till i want to compile i have to get them pre-compiled ahead or get it out of the way take it out of the way because that's not what you need to worry about which even worry about is a stuff in your project so freaking house headers get you get a lot of that bottleneck out of the way and get it done ahead of time we're also the notion of predictive compilation as again as you're working with your file you're editing you know this much but there's these include at the top the ability to go ahead and start to compiler up and say you know I'm editing this file go ahead and take care of the things that probably aren't going to change yet go ahead and figure that out so that when i hit swing it safe all we're going to do is just process the rest of it compile has already sitting there the cars already warmed up where you go ahead and process that and get it out of your way so that by the time you actually go and hits a build hammer to go ahead and take your application and put it all together we've already done most of the work and so the turnaround time for single file edit is very very small get things up to speed get you on one with life something we also introduced called zero link the ability to just take the link step out of the way to dynamically loaded up the elements that you need as you need them when your application starts up you may not need everything so why try and link it well I spend that time overhead early let's just do it later so we're going to reduce the linking step down to a very very small fraction and then distributed builds the ability to say I've got all these machines we do take advantage of the fact that if you have two processors will do parallel compilations so you get twice as much but what about all those other processes are sitting out there all those other machines that are potentially Idol we want you to take advantage of those so distributed build allow you to take advantage of all sorts of machines heterogeneous homogeneous in vironment whatever you have will take advantage of those start sending the files out across the wire letter then compile and bring them back so we do that we do the pre compilation for the headers and the linking on your machine but we only do those wants so you take care of those send everything out and bring it all back so I want to go through a quick demo of some of the build system features what I'm going to do is actually change applications on you here at the moment we have native support for the sea based languages not for java although we are working on that so i'm going to go ahead and open up an opengl app here called bullying i'm sure this is matthew guys all seen before just has an opengl rendering of a little bouncing ball that will seem a little bit as i mentioned before we have elements like inspectors that can go ahead and look at different attributes on a file so i can just go ahead and select one of the files here in the detail view bring it up and look at different information i can see that there's path information there's all sorts of file encoding information it's actually an additional compiler flags i can send / file compiler flags which make it very easy to customize on a profile basis but one of the things we've included in xcode as a result of lots and lots of feedback is the ability to do multiple selection for example here's the directory structure for my project and here's something that perhaps a lot of people like to do is say you know i want to create this source folder and i want to grab a whole bunch of files and i really want to put them in here because that's really the way I work with my project the problem is you go back to your project and now they're all red xcode says I don't know what happened they they went somewhere and normally you'd have to go through and inspect each one and change them but now we have support for the ability to select multiples come up here to the info window and you'll now see at the top it says multiple item info we're editing multiple at the same time I could just go ahead and hit the choose button go ahead and select the source folder location and you know that they all turn black again going to modify multiple selections very very quickly in these work now of course we all know that our source code revision control system would really not appreciate us doing that so I'm going to go ahead and take that back out and I'll play nice and put them back to the way they were but this multiple selection works both on the file level and it also works on the target level the ability to go ahead and select multiple targets for example and set the same setting on multiple targets at the same time so all the sorts of settings you want you can set them now on a per target basis or multiple target basis rather as well let's go ahead and look at the inspector for the target because we've made some improvements here that you guys also should see I'm going to go ahead and go to the build settings tab here from my target and we'll see that here all the different build settings for my particular target now you'll note that one thing we've changed here is the ability to look at collections or groups of settings but that's what we're looking at all of the settings but there's this nice little pop up here or i can now go through and say oh I want to just look at the versioning flags or I want to look at all of the everything has to do with the compiler or something that has to do with linking be able to filter down the list to see just the things you want in the way you want them you'll also note that there's a setting at the top for customized settings and these all appear in bold these are settings that you've customized or their changed in your target from the defaults so just a little bit of piece of information here when you see the bold settings if I go back to the all settings and you see that there are some in bold you know that these are ones that have customized values you also note that the ones with little strike through those are ones that have been overridden by your build style but they'll be more on that in a later session some other advancements we've made in setting information here is the ability to edit large settings for example a product name well you're probably not gonna have a really huge name for this I could just go ahead and click on this and change it right in here but there may be settings that are particularly large or need to be set for example header search paths i may have lots of header search pads and up until this point you've added clicking here and start typing and scrolling all the way over and it was kind of like setting the path back in Windows 95 we just had to keep moving over and over and over we apologize for that and now we've done is giving you an edit settings button so now what we're to do is bring up a table view which you can go ahead and clicking here and start adding different settings you can also do nice things like I can grab a folder from my project and do that I could also go into the finer here and grab a folder and bring that up to be able to take large settings and manage them in an easy way we also do this for just plain string values so I could go ahead and go back down here to my product name and go ahead and click the Edit settings and I could make this as big as I want to where am I asked to be named something really large so build settings so quick and easy way to go ahead and modify information your project let's go ahead and let's just actually go and build this so I'm gonna do is I'm actually to select the implementation files down here just so that they're visible and I'm going to go ahead and click the build hammer so what this is going to do is start building and you'll see that as its building the size of the code is going through here and you'll see that we have different sizes here and look at that build failed what a surprise so now we need to figure out something happen something is wrong with my build I need to figure out what's going on there are a number of different ways to do that you see that we annotate the status bar with the build information on both sides we also note that they'll be errors and warnings smart group is in red and if I click on that I could see all the details about what those are and where the problems were I could also go to the detail build log up under the build menu here and see all the detailed build results I'm gonna make this window a little bit bigger and scroll this down and it's the same information that you saw before but what we're going to do is just put in the detail build window and for those who really want to see everything we can scroll it up and see here's exactly what happened through the build and it's important though that these windows actually track so we're I to go and select an error up here we actually highlights as the appropriate line down here that shows where that error was generated from so you can get exactly down to all of your problems so let's just figure out something what's wrong with the apparently bboying view class I'm going to go ahead and bring that up in the editor here and you'll note that we annotate a number of things first we annotate the scroller here it will give you access to where things have gone wrong we can see who's gotta wake up a couple of different spots here and we also annotate the gutter for the different elements so I can see if I look at this first one here and I go ahead and click on it you'll note that the air comes up here and it says that new is undeclared that's because that really was meant to be know if I can go ahead and fix that error I could scroll down here to the bottom and say oh well here's just a warning on something I needed to do before i left that in there I can just go ahead and take that out let me scroll back up to the top here and see what these other errors were now again like a simple one here I just forgot a semicolon maybe that will take care of it so i'll go ahead and fix those and click build again it's going to go ahead and build it and click help still didn't do it i still have this one problem where there's this index default value it doesn't it doesn't know where it it's not declared anywhere that was actually my fault i meant to actually define that as a preprocessor macro so i can just go back to my build settings here and take advantage of this next search field at the bottom and start typing in preprocessor could just go ahead and take this value here and put it back over here paste it in say i equals 0 now i should be able to go ahead and build my application go ahead and click compiled build succeeded quick and easy way to find all the some of the problems that are in your application get on with just building it we also have a number of other build features we have the ability to compile a single file to set up once to pre-process it where you actually want to see what the assembly code looks like for your particular file you can actually go ahead and do that and here's the assembly for what this particular file would look like so that's just a quick overview of some of the build system features there are other sessions on the build system later on in the week actually one tomorrow at three-thirty in this very room the increasing productivity with xcode to which i encourage you guys to go to if you want to learn more about the build system so let's learn more about xcode and this time going into the debugger go back to the slide please debugging is also important once you've built your application you need to figure out all right how do I deal with it now how do I figure out all these problems just not just warnings an error but aberrant behavior we include a completely integrated debugging experience the full featured debugger for the sea dialects for Java either applescript with all the common operations you would expect the ability to step through things to pause through things look at things introspect things it's very very feature which includes a lot of new features we include things like in line break points set of brighten the gutter move them around move the pc back up and try things again a complete graphical interface to look at things like a thread view in a stack view look at all your different variables with custom data for matters even based on your type to look at the information you want in the debugger also some new features the Global's browser which maybe you saw yesterday in Ted's keno they look at global variables for your application a memory viewer to go ahead and look at memory points for your application and see exactly what's going on when you build even the ability to look at disassembly and see the different things that are in your application but there's lots of other integrated debugging features things like data for matters as I said before the ability to take a particular piece of information in the variable view and customize it you may know something about it you want to format it or summarized in such a way that's easier for your workflow we provide a lot of those by default for the carbon data types which you can actually go ahead and do those for your own data types as well but much like with the build system we also pride them provide you features that get you up to speed get your running get you very productive as productive as possible with a debugging experience one of those it's fiction continue how many of you actually use to fiction continue not enough it's a very very good feature six me continue allows you to take a running application that you're debugging make changes with a source code change the application on the fly and keep running so go ahead and patch the running application things like logic errors errors of trial and error we need to try something over and over and over again your application takes a long time to compile or takes a while to start up you don't have to go through that just for a simple change I forgot a semicolon there or that was supposed to be two instead of one the ability to go ahead and fix your running application and get it back up to speed is very very useful and I've encouraged you guys all to try other things like remote debugging we saw a demonstration yesterday oh a game developer debugging an application running on one machine with a debugger running on the other is extremely useful though full full screen applications but also applications that have lots of intricate event handling things like mouse clicks and keys and highlights and stuff the ability to track those let your application deal with it in such a way that it's not affecting by the debugger popping up or her break point being set but still being able to debug your application like you normally would it works exactly like it would on your son your one machine so the bugger experience is exactly the same which you take you leverage the fact that you have two separate machines and something included now which is called guard malik the ability to actually use the fact that we know when bad things happen to your memory and we're actually going to show those to you when there are memory access errors we're actually in a thrown exception and say you know what this is a problem you need to go and look at it so it's a great debugging feature i want to show you a quick debugging demo and what some of these features look like so we have the application that i just got done building here so this is the same Boing application I'm just going to go ahead and launch it onto the debugger so it just says you know go ahead and debugging probably news they build again since it's already built and it's going to go ahead in a second here but the bugger is going to start up and we'll see what it looks like so right now we are going through and debugging our application now I've scripted my application demo here in a very very specific way to talk about what happens when we're dealing with the beta software all right now we release beta software just as much as you do things happen now this is a really important point is that this panel right here is your gateway to salvation because it's your way of giving us information the ability to go ahead and say report to click on this and say look here's the crash information for xcode here's what happened you know you have lots of power your fingertips to fill out exactly what happened or what you're doing here and click Submit and give us that information even more to the point were you nice ADC developers and you want to actually take advantage of the fact that we have this little website called bug reporter you can actually go in and file a bug take that stack serious information and put it in the bug because the fact is on the benefits of our application the feedback that we get on our application shows and what we were to you guys the better feedback that we get the better the product is when it comes back out so I encourage you I can only speak to my application but I would implore you that we're something not that it happened but we're something to happen in Xcode where you get this panel I'd implore you to please submit that information please from this a bug report so that we can show you what's going on with it so now that the little public service announcement is done let's go back to the demo and go back to the application here so now I'm just going to go ahead and let's just clean the application again show you the nice build system at work and we're to go ahead and build into bug so again we'll watch the application compile here and we'll watch it come back up this time in the debugger much as we would expect so now it's going to go ahead and run you'll see that the application launches and it's running down here in this nice little window it's a little bouncing ball try and bring it up here and I can actually make it a little bit bigger for you guys to see so there's there's my little bouncing ball now I can go back into my application and say I know that most of this is happening in the Boeing view class and I'm going to do is just go back up here to the top and I know that most of the work is getting done in the draw rect so I'm just going to go ahead and click in the gutter here and create a breakpoint so that's actually got to load the file and debugger and we'll just work from there for now so here we see that the application is stopped in the debugger keeps the debugger view of here's the thread view of what's going on here's the variable view of the information that corresponds to that particular frame i can go ahead and select on different frames and see the variable information in this particular frame i can also note that we have some value information that uses some of our data for matters for example in this particular case we have an NS wrecked here that's showing the origin and a size so i could expand this we see that this wrecked has the origin and the sides would seem to meet it and here are the values and you're probably asking well how does 10 of these values get formatted these are the data for matters so I'm going to go ahead and double click on this value you'll see that we have a little bit of a formatting that goes in here and I could go ahead and even change that formatting just say the origin is and you'll note that the Rex changes because those data for matters are all packed up so if i set a data format on this particular case on the origin anywhere that uses an origin including a wrecked gets the value of that it's the benefit of that so you can set for matters on things where you want to see different pieces of information you want to look at something in the variable view you don't have to go ahead and inspect it or go to the console to debug it you can go ahead and format those elements show them right there so let's go ahead and look at some of the other controls that are up here we can go ahead and continue through we paused right here on our break point we go ahead and step over a particular element go ahead and keep stepping through my application I can open up and look at more elements for the timid debugger but we can go ahead and do that or we just go ahead and kick continue going to hit my break one against I'm going to go ahead and unset that and continue along the merry way let's show you some of the elements that we talked about like six and continue for example I'm looking at this you know red is just not the color I'm looking for I really want something else so I've actually set some nice little bookmarks in this file to go ahead and jump right to a particular point and we see that right here is where the colors for that panel are this panel define right now it's red it's RGB value and I can just go ahead and change those values from let's from red blue I'm going to go ahead and save that file and now I'm going to go up here and click six so while my application is running when I hit the Fix button it's going to go ahead and compile it going to go ahead and now my ball is blue applications still running but I'm changing values so that my application is using I can do other things like changing simple things like I don't upset the background color I think that that background color is way too dark let's just go ahead and change the value here save that again again while the application is running go ahead and click fix and now we're changing the value now these are just simple values that we're changing it doesn't look that complex but the ability to try things out like this to do trial and error things while the application is running is very very useful let's do something a little more complex for example there's something here called a light factor when I hit the L key it's actually must start applying a light factor to the side of this cube and you'll see that the cube gets a little bit darker a problem is I have no way of undoing the way they implemented it was it just starts the shading and there's no way to change that value you've actually see the code is actually right here whereas it's drawing it says if I'm supposed to do this increase the light factor over time until we get to one and that's it there's no way to undo this so let me actually show you modify buying this code while it's running something more than just little logic values well to do this that the problem is I want to be able to cycle back and forth between the light value and the non light value so I'm going to go ahead and add this other boolean in here called do light increase and I'm going to go ahead and say that well in this particular case if our light factor is if we're increasing then I certainly want to make that the light factor increase just the way it was before so we'll say the light factor still increases by point 05 but if it's not what I want to do is I want to decrement the value so we're going to use this boolean to track whether the in flight is increasing or decreasing so in this particular case I need to say well if we are increasing and the light factor is over 1 just stop at one don't go over and above that but now I need to add a little else clause in here that says well if I'm not increasing i'm actually going down and i don't want to go below zero because i don't want to say it out completely then just select a value to 0 and we'll be done so now I've just added some code to go ahead and allow its ability to cycle between whether this is how the light factor or not one last thing I actually need to change was that there's the keystroke at the bottom here or we actually go ahead and click the key it's right here where you see if I hit L it says do light equals yes and in this case i want to say well i only want you to do we use some code completion to get that value for this i only want you to increase if the lights factor is already at 0 otherwise i just want you to decrease so we're going to go ahead and set that up save that and now i'm going to go ahead and click fix so while this is running we're gonna go ahead and sticks that and now it should be able to come back here hit l and turn the shading off so the ability to add need of different instance variables change the logic to your application while it's running makes it very very useful to debug there's some simple things we could do we could go ahead and if we want this all to end very very quickly I can just take the animation change the velocity by which this is running to something much much quicker and make the ball stop for all of it so let's show it if some of the other elements to our application while it's still running showing you a couple other things features that we didn't should talk about yesterday but are worth showing is something like the memory browser so what if I a look at different pieces of memory in my application I want to look at something you know something interesting we allow you to go ahead and let's just go ahead and let's just pause this and here's a memory viewer this is not my particularly favorite view but I know a lot of people are looking for this kind of information to being able to actually step through your memory and look at different pieces of information to look at all sorts of things this is for you we're happy to provide it there are other things like even a console view if you're if you love the console view and you want to live there we provide a quick and easy access this way to get to it so we try to provide you the best of all worlds functionality get you up to speed with what you're looking at from the bugging features from simple things like looking at variables to fixing your application while it's running or looking at memory the ability to take your application figure out what's wrong and get back to what's important so these are some of the quick debugging features we have a complete demonstration of debugging on Thursday so we go back to the slides there's a complete session on this on thursday morning at nine o'clock again in this room debugging in xcode that encourage you guys all to go to for more information another thing that's important once we're building and debugging our application is working with other people source control management for those of you are using Xcode you may not have realized that source control management in there because it's actually integrated it's immersed in the IDE and all number of a large number of places you'll see it in visualization columns in the outline view in the detail view you'll see it in a smart group of showing you all the things that have changed we have a complete SVM window for showing you all the things that have changed in your product and looking too messy n log and we also have inspectors to allow you look at different revisions and track things and compare things based on a particular file now we support all the common commands from the IDE the ability to look at annotations to update to discard changes to look at revisions annotations dis these are all available in the IDE but from menus and context menus right at your fingertips as was announced yesterday we are happy to support now subversion as one of our cm systems fully integrated in Xcode what I'd like to do is show you that in right now so let's just take the same project that I was working on for a quick second I'm going to go ahead and stop the debugger cuz I don't really need that anymore and you guys are probably gonna remember to do this so I'll close that window so now I'm in my application and you see me make changes do you solemnly make some changes for fixed and continued question is how do I know that I've made those changes well one way to do it is to customize the view here I could go ahead and customize the panel here by control clicking on the header and I can select svm and we'll see that it tells me that the products project has changed and as I expand things we also see that there are other files that has changed I can actually go ahead and add the SCM column over here if I want to look at in the detail view so I can see it in either of both of these views but if you want to look at all the SCM information in one place there are two ways to do it if you want to look at it in the project view you can go ahead and select the SCM smart group and now we're going to filter on all the files that have some kind of SCM status whether it's modified changed conflict whatever it is this is gonna be the one-stop place you want to go and look at it we can also though bring that up in a separate window so I can bring up under the SCM menu the SCM window and show it to you here so here all the files that have changed and i see that i have the files that i changed and that i have my user file in the project file let's go ahead and look at something interesting about what these files are so let's go ahead and select a file here and I'm going to go ahead and bring up the inspector for this particular file and you see that there's an SVM tab and when I click on this you'll note that here is as the SCM history so I have the revision history I've my name the date and I have a message so i can go ahead and look at different pieces of information so let's take the version we have and let's compare it to something from nine nine o'clock this morning and i can click on disk so what's going to do is take the version i have on disk go and grab the selected version from a repository and here's a diff so i can go ahead and put this into a bug i can send this to someone as changes I've made very very quick and easy way to compare revisions but actually that was more actually that was just dissing comparing a vision to something much different but much more compelling let's go ahead and before we do that let's look at annotations say i look at this other version and say you know what i really wish I knew who made those changes because that just just doesn't seem right to me if I can go ahead and grab this file here this revision here and I could go up under the Norman I could go up under the SCM menu but for some reason it's now unavailable what's while it's thinking about that let's try and compare so instead of doing an annotation I'm gonna go ahead and click compare and you'll note that now we're going to bring it up in file merge so file emerge takes those two versions but one I have on disk and the one that's in my repository and brings it up in a way that I can look at the diff pretty seemed pretty quickly any pretty easily now in addition to external editor support we also have external support for different kinds of SCM access and for those of you who may be like the bbedit style of file merging we're going to go ahead and apply that and I'm going to go ahead and dip it again our compare it against a different versions you'll now note that bbedit launches I want to stun grabbing those revisions now is to be the edit style comparison so depending on what your flavor is we can go ahead and pull up either one of us if I were to go back in here and grab my element we can actually go now and look at the annotations so let me grab a particular source file say grab the latest for that and it's going to take that and pull it up in an editor and here is the annotation response for this particular file there haven't been that many changes I've only made a few changes but as we scroll through you can see what revision was changed and by whom now you might be asking well these revision numbers look really kind of strange i don't know that i've seen these before one thing that we actually pride ourselves on is the fact that all of our SDM functionality is seamless it also feels the same so you may not have been noticing but this is actually using subversion so if we pull up our little status window here and I can just go ahead and zoom in for you right there you'll note that user local subversion bin X to the N this is all done using sir version so same thing is CVS acts like CVS commands in Xcode but it's using the power of subversion so the fact that you can't tell the difference is actually a win for us and makes it feels like we've done the right job of not making things all different based on different SCM systems so we can actually just go ahead and once we're done let's just actually show the very simple thing of go ahead and selecting a couple files go ahead and committing the changes and say this was in the demo go ahead and commit those go ahead and commit those to the repository you know that they go ahead and leave the view and they've been committed simple SCM actions simple things that your daily workflow probably requires doesn't require to leave the IDE so that's just a quick visit of visual of source code management there's more on this in the presentation tomorrow if you guys want to learn more information we have one final topic that will go back to the slides for and that's integrated profiling tools how many of you guys have used profiling tool in here shark Malik debug Stampler these are extremely useful tools that are bi platform provides we have lots of different tools probably different aspects of introspection for your applications things like Malik debug looking at the debug for your application figuring out where things are going on sampler and spin control of figuring out what your application is doing it doesn't seem to be responsive it doesn't see me be doing what I want it to or it seems to be hanging shark as well as being able to look at all the things that your projects is doing all the things your apps are doing even all the things your system was doing at the same time to go ahead and look at those and find a way to make your application as performing as possible there are complete sessions on this there was actually one this morning on profiling tools and there's one later this week on shark but I want to give you a quick view on two of these tools and what they look like so the last demo here is going to go through and show two of the profiling tools so what I'm going to go ahead and do is going to quickly rebuild my app because I made changes with zero link and I want to make sure that we've actually built those into the application but under the debug menu we'll see what there is launched using performance tool and there's a couple here let's just go ahead and pick object Alex first what's going to go ahead and do is it's going to go ahead and launch object Alex for me and it's going to configure object Alex to go ahead and launch my application so you see that object Alec comes up it already knows about where my application lives I can go ahead and hit the little play button here and tell it what I wanted to do and now it's going to go ahead and launch my application and start looking at it start looking at all the things that are being allocated in this right now we have live updating going on and I can start scaling this back so you can start see what the allocations are how they're being projected to your application and you can start to figure out where the leaks are happening where you may be creating think more things and you really need to where things can be trimmed down a little bit quick and easy way we've already built the app launched it in object alec but it makes it really easy to test and see how your application is working but say you want to do something a little bit more complex fulness so you want to figure out not just where things are being allocated but where you're spending the most time to do this we're going to go ahead and use shark the same way we're going to go ahead and launch shark to be pre-configured to know where our application is go ahead and say ok and it's going to start off our application it's shark is now sampling up here we can go ahead and click stop and it's going to go ahead and take all the samples that it just found from our application and bring up a look at this view how many you guys have you shark I would implore you guys to all to take a look at it may seem a little complex from the beginning but it's a very very simple application to use and it provides a lot of information about what your app is doing about the ability to go and look at even just the things that you have source for and to go ahead and drill down into I'm spending thirty four percent of my time in this draw rect particular function we can see that based on where the shading is of where you're spending the most amount of time doesn't take that much effort to go ahead and look at this but it provides you a vast amount of information about where you can improve your application so just a quick overview of launching a couple of performance tools if we go back to the slides again there are complete sessions on this there is one on friday in the afternoon on actually using shark to work with your application this is what we do all day is x coding is providing you a set of tools to work for all kinds of different development projects to help you guys bring things the mac OS 10 platform and as we talked before we're providing you two ways to do that today to be very clear xcode one dot five is on Panther the beta release that we'd love to get your feedback on xcode 20 is on tiger it's a preview and you can see that number of features that are in each the difference being the workspace layouts and the design tools on tiger are just some of the differences from the major differences between those two but we'd love to get your feedback on both versions on the different X conversions that you guys want to try there are lots of ways you can get more information about Xcode there are lots of other sessions this week Matt Formica is going to be the contact for you guys for other things that you might want to know about Xcode and we'll bring him back up on stage right now to go through a little bit of a QA