Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Alphonso Sensley II
Alphonso Sensley II
8,514 Points

Swift 3 & Xcode 8? Swift 4 & Xcode 9?

Hello TreeHouse community!

So I am about 3 months into my journey/goal of becoming a iOS Developer. Treehouse has been an AMAZING resource. While I am progressing well and have a good grasp of all the basics of Swift. I am just beginning to gain understanding and delving into the more intricate aspects of iOS Development.

As you all know, beta versions of Xcode 9 and Swift 4 are now available to developers. In your experience for a beginner like myself, would it be better for me to continue with Swift 3 and Xcode 8? or should I jump into Swift 4 and Xcode 9?

Or maybe I'm overthinking and there aren't that big of differences between the versions. Any input you all may provide will be greatly appreciated.

Pasan Premaratne
Pasan Premaratne
Treehouse Teacher

Alphonso Sensley II

You should continue with Swift 3 :) Most of the changes to Swift 4 are under the hood sort of changes. If you're interested in understanding more about the changes you should check out this playground.

If you want to use Xcode 9, go for it! The editor is MUUCH better and has lots of cool new features. Keep in mind though things are in beta which means they will be really buggy. Some times you might write some code that won't run and the issue won't be with your code but with Xcode.

Might make learning a bit cumbersome.

9 Answers

Thomas Dobson
Thomas Dobson
7,511 Points

There is nothing wrong with using either. Just remember in a few short months, you will be upgraded to xcode 9 when its made standard. You should try to use Xcode 9, and fill in any gaps or discrepancies with a little research. If all else fails and you cant figure it out; since they can be installed side by side, go back to xcode 8.

Alphonso Sensley II
Alphonso Sensley II
8,514 Points

Thanks for the input Thomas! I may use both Xcode 8 and 9 simultaneously.

Jeff McDivitt
Jeff McDivitt
23,970 Points

Hi Alphonso - As a beginner Xcode 9/Swift 4 are not needed, but on the flip side there is nothing wrong with using them. If you are interested I would read up on changes because eventually Xcode 9 and Swift 4 will be the standard. I have been programming in Swift since its implementation, coming from an objective-c background. Where I work we have completely transitioned everything over to Swift but still keep our objective-c projects. I cannot disagree that Treehouse is a great resource and is the reason I am on here because I wanted to see how effective it was compared to Udemy, plus it keeps me refreshed on my Swift code. I would encourage you to learn as much as you can about Swift and code as much as you can, in no time you will be at the level where you can get an entry level Swift job!

Alphonso Sensley II
Alphonso Sensley II
8,514 Points

Hi Jeff, thank you for the response! I am reading up on the changes and it sounds like the switch from Swift 3 to Swift 4 is alot less cumbersome than the switch from Swift 2 to Swift 3. Also learning about a lot of cool new tools in Xcode 9 like Refactoring! Im studying Swift/programming about 2 hours a day during the week. And it is always fun when something finally clicks and I begin to understand concepts that I was only vaguely grasping before. Thanks again for your advice. its good to know that I can reach out a get great insight here in the Treehouse community!

Jeff McDivitt
Jeff McDivitt
23,970 Points

Hi Alphonso - Sounds like you have a great plan in place to reach your goals. Happy coding :)

Kavita Bargota
Kavita Bargota
2,741 Points

Hi there, I have just come across this as I was also stuck too. I am doing the beginners ios course and reading/following the documents attached which are Swift 4. I didnt realise this until some code I was inputting onto Xcode 8 was coming up as errors (forgive me i am completely new to this).

Are there any tutorials on Swift 4 on Treehouse? I am getting a little confused with everything at the moment...

I have Xcode 8, learning Swift 3 on treehouse but following and practice Apples Swift 4 guidance.....is this wrong? Should I be using xcode 9 and continue practicing as per Apples guidance Swift 4?

Also would Treehouse Swift 3 video tutorials still be appropriate? (sorry its obvious but I am new to this and have no idea)

thanks

Kavita

Thomas Dobson
Thomas Dobson
7,511 Points

I haven't done much as far as projects go in Xcode 9 yet, but I have found significant improvement within Xcode 9 playgrounds; much more stable and consistent.

Pasan Premaratne
Pasan Premaratne
Treehouse Teacher

Hey Kavita Bargota

The documentation attached is something that Apple maintains. When they release a new version of the language, they update the documentation for the current version. Swift 4 released this past Monday so I guess they've updated it already.

We can't update tutorials to Swift 4 just yet because Xcode 9 is not out yet. But we will start cleaning things up soon so that students know about these changes

Kavita Bargota
Kavita Bargota
2,741 Points

Hi Thomas,

Is it available to download? I cant seem to find it? and also can I transfer what I have learnt from Swift 3 onto xcode 9?

thanks

Thomas Dobson
Thomas Dobson
7,511 Points

Its available from the Apple Developer Portal. You may or may not need to be an active registered developer (fork over $100) to get access to the Beta... not sure on that one.

Kavita Bargota
Kavita Bargota
2,741 Points

Hi Thomas,

I think you are correct. I am guessing it would be free to download maybe in the next few months though.

Until then I will continue to use Xcode 8 with swift 3.

Is there a massive difference between Swift 3 and 4? Would there be any overlaps with Swift 3 and 4? in other words could this still work once I have xcode 9?

thanks

Thomas Dobson
Thomas Dobson
7,511 Points

Swift 4 will encompass all of swift 3; with improvements, changes, and removals. From what I am hearing, there is not a huge gap in the two.

You should be able to view the Swift 4 Docs

Kavita Bargota
Kavita Bargota
2,741 Points

thanks Thomas,

I am reading and working with Swift guidance (as these are the ones that are attached to the ios beginners videos) so I have just been viewing them.

I have obviously noticed the at the code doesn't always work on the xcode 8. What I am doing is making notes on the code that doesnt work on the xcode 8 and to transfer it when i get the xcode 9. I hope this is good way of going about it!

thanks

Kavita Bargota
Kavita Bargota
2,741 Points

Hi Pasan,

Ok thanks for your reply. Making sense now!

Ok for now do you advise I should continue with the iOS beginner track (Swift 3) on Xcode 8 and not bother too much with Swift 4 documentation? Or will Swift 4 cover all of Swift 3 with obvious added features to the code therefore still being beneficial to read along with your videos?

Thanks

Kavita

Pasan Premaratne
Pasan Premaratne
Treehouse Teacher

Yeah continue with Swift 3. Swift 4 does cover all of Swift 3 with some new features and we'll amend courses to take these changes into account where they pop up.