This workshop will be retired on May 31, 2020.
Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Working with Xcode 83:30 with Pasan Premaratne
If you're using Xcode 8 to take Swift 2 content, you will run into some issues. In this video, let's take a look at why this happens and how you can continue your learning experience without hassles.
- Xcode 7.3.1 - Requires developer account
- Xcode 7 Single View Application Template Starter File
- Xcode 7 Master Detail Application Template Starter
Hi there I'm for 0:00 Bason the instructor whose course you'll be taking in just a second. 0:01 Sorry to interrupt you right as you're about to get started, 0:05 but I have an important announcement to make. 0:08 If you've all ready heard me say this feel free to skip. 0:11 The content you're about to take was recorded using Swift 2.0 and Swift 2.3. 0:15 In September 2016 Swift 3 was released and Swift 3 is a big change from Swift 2. 0:21 If you're just getting started you'll be done living Xcode 0:27 the software you'll be using to program from the mac app store 0:32 the latest version of Xcode is 8.0 and it uses swift 3 by default. 0:36 This is important to know because when using Xcode 8 the version of Swift 0:42 you will be writing with and 0:46 the version in the video that you will watch are different. 0:48 And this means that code you see in the video, although correct in Swift 2, 0:52 may not always work on your computer. 0:57 For those of you who've been taking content from before Swift 3 was released 1:00 this is still important to be aware of because you may have updated Xcode or 1:04 depending on how your machine is set up, Xcode may have updated automatically. 1:09 Unless you prevented that update, you were also now using Swift 3 by default. 1:14 So what does this mean for you the student? 1:20 We at Treehouse are working on getting all the Swift content updated for 1:23 Swift 3 as soon as possible. 1:27 In the meantime if you want to learn Swift and iOS development immediately, you can 1:30 still continue to take this content but you'll have to work around the issue. 1:34 There are two ways that you can do this. 1:39 The easiest way is to install Xcode 7.3 on your computer. 1:42 You can't do this through the mac app store because you only get the latest 1:48 version there, instead you need to go through Apple's developer portal. 1:52 In the teachers notes section of this video, 1:56 I've provided a link to download Xcode 7. 1:59 To access this download, you will need a valid Apple Developer account. 2:02 You can have as many versions of Xcode on a single machine as you want. 2:08 So if you already have Xcode 8 installed, you don't have to get rid of it. 2:13 Just make sure that you always use Xcode 7 for these courses. 2:17 If for some reason you don't want to go this route, there is another way. 2:22 Xcode 8 uses Swift 3 by default but it can work with Swift 2 as well. 2:27 It can only do this, however, 2:33 if you open a file that was created in Xcode 7 and uses Swift 2. 2:35 When you open this file in Xcode 8 it will prompt you 2:40 to convert the project to the latest syntax of Swift. 2:44 You can select not to do this and continue writing in Swift 2. 2:48 In this way you can take Swift 2 content on Treehouse 2:53 with just a single version of Xcode installed. 2:57 To go this route, however, you will need files that were created in Xcode 7. 3:00 I've provided some empty project files below, which you can grab 3:05 through download links and you can use them as your starting point. 3:09 This is pretty cumbersome, though. 3:14 So if you do it, 3:16 just remember to always decline to update the project to the latest syntax. 3:17 I hope this helps. 3:23 In the meantime, I'll get working and getting you content in Swift 3.0. 3:24 Have fun learning. 3:28
You need to sign up for Treehouse in order to download course files.Sign up