Start a free Courses trial
to watch this video
Xcode 4 is a major improvement from Xcode 3 is available for download through the Mac App store. The new design implements a single window interface which makes navigation seamless.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up[? Music ?] 0:00 [Think Vitamin Membership] [membership.thinkvitamin.com] 0:03 [iOS: Xcode 4] [Installation and Navigation] 0:08 Amit Bijlani: In this video, we are going to learn about Xcode 4. 0:13 Xcode 4 is a major improvement from version 3 with a better graphical user interface, code completion, 0:16 real-time debugging and user workflow. 0:23 So, let's get started. 0:26 We started the iOS course with Xcode 3 because we wanted our users to get up and 0:28 running as quickly as possible. 0:33 It is also because Xcode 3 was available for free. 0:36 However, now the time has come to move onto Xcode 4, which is not only better, 0:39 but the standard going forward. 0:43 As you'll see on this webpage, Xcode 4 is available for free for those that are 0:45 signed up for the $99 developer program for Mac or iOS. 0:50 If you are not signed up, then you could easily purchase Xcode 4 from the Mac app store. 0:56 We're going to assume that you have downloaded Xcode 4 using either means. 1:02 So, let's get started by installing it. 1:07 So, here's my disc image. 1:11 I'm going to double click on that and doubleclicking on the package. 1:13 It will ask me to continue, so I'm going to just continue, 1:20 and as seen previously in the installation of Xcode 3, it's a very standard install. 1:23 So, you hit "continue." 1:28 You agree to the license. 1:30 You select the destination, and if you've installed Xcode 3, 1:37 then it's going to ask you whether it's an upgrade, and just basically 1:42 leave all these options the way they are. 1:46 They're already standard options. 1:48 And finally, I'm going to hit "install." 1:53 Let's go ahead and open up Xcode. 2:09 Once you open Xcode, it might prompt you with this dialog box where it's saying 2:12 that it's attempting to install. 2:16 Just go ahead and insert your password and click "OK." 2:19 Then it might open up another dialog box with Mac OS X 10.6 core library. 2:22 So, go ahead and do the same thing over here. 2:27 And finally, for iOS 4.3 library. 2:29 So, now it brings up the same welcome screen that we have seen in Xcode 3. 2:34 There's nothing new here except for this one little option here that says 2:39 "connect to a repository." 2:42 This is if you want to connect to a version control server such as Git or Subversion. 2:45 We will take a look at this in a later video. 2:50 For now, let's just create a new Xcode project. 2:53 Once again, this video is very similar to what you've seen in Xcode 3. 2:59 We'll select view-based application, and we'll click on "next." 3:04 Here, it's a little different where it asks you for the product name and company identifier. 3:10 So, the product name we will give, it's called "Zone Clock." 3:15 We'll actually create a clock where you enter the time in U.S. Eastern Standard Time, 3:21 and it will give you the Pacific Time as well as the Central Time. 3:26 So, I'm going to write "Zone Clock" as the product name, and company identifier 3:32 for us would be com.treehouse. 3:36 As you'll notice, it asks your device family, so it basically wants to know 3:41 whether you're building for iPhone or iPad, and finally, it says "include unit tests." 3:45 We're going to leave this out for now because we're going to cover this in later videos. 3:52 I'm just going to hit "Next." 3:57 As you'll notice, it mentions create a local Git repository right here. 4:00 So, a lot of the version control is built in now with Xcode. 4:06 So, for now, we're going to just let it create the local Git repository. 4:11 We'll see how later on it works with the server side. 4:15 And we'll hit "Create." 4:18 So, right away, you will see that it brings us to the summary of the application 4:22 where it has all kinds of application information. 4:25 For example, the supported orientations, app icons, launch images. 4:29 We'll take a look at this in a little bit. 4:33 But first, let's focus on the latest and greatest features in Xcode 4. 4:36 One of the biggest things about Xcode 4 is that it's a single-window application. 4:41 As you must have noticed in Xcode 3, every project that you opened 4:46 opened up in a separate window, and you just had to juggle a lot of windows. 4:50 So, they have done their best to eliminate that and make sure that it is pretty much 4:54 self-contained, and you just have to deal with one single window. 4:59 So, to your left over here is the navigation area. 5:03 I'll just click on one of the header files over here, and then you will see. 5:07 As before, here is our editor area to the right. 5:12 Up top over here you will see a few icons. 5:17 We'll come to those icons in a little bit. 5:21 Let's go back to the navigation area. 5:24 Up here you have the navigation bar where you see a few icons. 5:27 The first icon is your project navigator where just as before you've seen in Xcode 3, 5:33 you have your groups and files, so they're neatly grouped up. 5:39 After that, you have the symbol navigator where it actually displays the class view 5:44 of all the classes and methods that you have. 5:51 So, for example, you can see the different methods, and you can see the different 5:57 properties associated with that class. 6:00 As you can see over here, it says "hierarchical" or it says "flat." 6:03 Basically, the flat view will give you all the classes regardless of their inheritance. 6:08 The hierarchical view will give you classes in their class/subclass hierarchy. 6:13 Next to the symbol navigator is the search navigator where you can find 6:20 certain key words, and it will look inside the project for you. 6:24 I already have NSString typed over here. 6:29 If I hit "enter" there it says "not found." 6:32 Let's see if I type in "IBOutlet" and I hit "enter." 6:35 So, it will show me all the occurrences of IBOutlet in my project. 6:42 As you can see, it highlighted over here. 6:46 If I click here, it will highlight it in the editor. 6:49 You can do other nifty things over here, such as find and replace, and several other things. 6:53 Moving on, after the search navigator, you have the issues navigator. 6:58 Right now, we have no issues, but let's try and create one. 7:04 I can go over here and leave out the semicolon, and if I hit "command B" to build, 7:07 we've got a whole bunch of issues. 7:15 And if I click, it will automatically highlight the place where the issue occurred. 7:17 So, we'll just put back our semicolon and hit "build" again. 7:23 And the issues are gone. 7:29 This is a great way of actually looking at all the issues and warnings in your project. 7:31 Next to it we have the debug navigator. 7:38 This is when you're in your debugging session. 7:41 It really helps you a lot. 7:43 We'll take a look at this in another video. 7:45 Along with the debug, if you've ever created any breakpoints while you're dubugging, 7:50 you will see all your breakpoints over here. 7:54 I can quickly create one and you will see. 7:57 It actually shows me the file name and exactly on which line the breakpoint is. 8:00 And here, just as in Xcode 3, you have the active/deactivate breakpoint. 8:05 So, I can just quickly deactivate all the breakpoints by clicking 8:09 on that little button there. 8:13 This will basically deactivate all the breakpoints in your entire project. 8:15 And finally, we have the log navigator, which basically shows us all the builds 8:22 that we've created, and if there were any problems associated to the builds. 8:27 As you can see, as I click on each build, it tells me the problems that I faced 8:32 while I built the application at that date and time, and over here, 8:37 it says "build succeeded." 8:42 Now that you have Xcode 4 installed and taken a look at the navigation area, 8:46 in our next video, we will take a look at the text editor and the utilities area. 8:50 [Think Vitamin Membership] [membership.thinkvitamin.com] 8:56
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up