Next lesson playing in 5 seconds

  • Overview
  • Transcript

1.2 Prerequisites

In order to following along in this course you really only need one tool, Xcode. More specifically you will need at least Xcode 6 because that is the version that contains the ability to use Swift. It is a free download that you can get through the App Store.

Related Links

1.2 Prerequisites

Now, before we start writing any Swift code we have to make sure we have our development environment set up. Now, obviously, in order to write any sort of iOS code, or anything that's Apple related, you need to have a Mac. So I'm using a Macbook Pro here, but you can use a Mac Mini or anything you really have available. That's running at least Mac OS X 10.8, which is Mountain Lion, and anywhere up to the latest version of Yosemite should be just fine. Now, once you have that you're going to need the Xcode IDE. Now, it's very simple to get this if you don't already have it. You can head over to the App Store. You can search for Xcode. And the first thing that pops up, as you can see here, is Xcode, which is a developer tool. So once you actually dig into this, you can read a little bit more about what Xcode is as well as see what the latest version is. Now, you can see here that this is going to install 6.1, but I already have it installed. Now, if it wasn't saying Installed here, if you don't already have it, it will actually say free. This is a free developer tool. So, you can create and write code that targets the iOS platform for free, but actually, to be able to upload them to the App Store and actually start to make some money, you have to become a registered Apple developer, which costs about $100 a year, which isn't too bad all things considered. But if you are going through the process of installing this and downloading this right now, definitely allot some time for it because it is a rather lengthy and large download, but the good thing is is that it all comes in one bundle. So once you've downloaded Xcode, you've also downloaded and installed the iOS SDK and everything that you're going to need. But, do remember, in order to actually do the Swift development, you're going to need at least Xcode 6. So if you have 5, it's not going to work. You have to have 6. So once you've actually downloaded and installed Xcode, it's dow, it's installed into the Applications directory, but you can get there a couple of different ways. You can either go up to the magnifying glass icon up here, which is Spotlight, and start to type in what you're looking for, or you can use the keyboard shortcut of Cmd+Space bar and just begin to type in, Xcode. Now, as you can see here, I've multiple versions of Xcode installed, I have 6 and 5, which you definitely do if you would like. It can cause a little bit of confusion if you don't name these well or put them in the same folder, or things like that. So definitely read up on how you should set up your development environment. If you want to run multiple versions of Xcode, there's plenty of documentation out there. But as you can see here, if I run the first one here in my Applications directory, this is going to bring up Xcode version 6.1, so do make sure you have at least 6 installed. So, once you've come this far, we're going to look at, very briefly, the two options or at least two of the options you have, when writing code using the Swift programming language. And that is through the command line and through something called a playground.

Back to the top