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