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 Object-Oriented Swift 2.0 Class Inheritance Inheritance

Devin Boddie
Devin Boddie
6,777 Points

Why does Passant's xcode file not compile correctly even when i down load it and use it directly

Hello,

I am using Xcode Version 8.0 (8A218a) and when ever I try to mimic exactly what Passant is teaching or download his playground files, the project will not compile correctly and i'm left with tons of errors like "Expected Declaration" and so on.

1 Answer

Martin Wildfeuer
PLUS
Martin Wildfeuer
Courses Plus Student 11,071 Points

Xcode 8 comes with Swift 3, which introduced some subtle, but also many fundamental syntax changes. The Treehouse courses are Swift 2.0 (as the title suggests). When you open a Swift 2 project in Xcode 8, it should ask you if you want to migrate to Swift 3 syntax. A migration guide can also be found at Apples own Swift.org. This is what the whole community is going through at the moment. Swift is not a "stable" language yet and evolves steadily.

Having said that, big up to Treehouse for doing these detailed video courses regardless of their short half-life. And no, mods are not Treehouse staff ;)

Hope that helps :)

Devin Boddie
Devin Boddie
6,777 Points

Thank you Martin!

That totally make sense now that I see they have made updates for the same courses using Swift 3!