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 Build a Simple iPhone App with Swift Getting Started with Xcode A Swift Recap

Create a constant named bestSmartphone and assign it the string "iPhone".

I've tried several responses to this question and don't understand where I am going wrong. Checked in the forums and all their answers for this aren't working.

I tried:

let bestSmartphone = "iPhone"

getting_started.swift
let bestSmartphone = "iPhone"

3 Answers

Moritz Lang
Moritz Lang
25,909 Points

Pasan Premaratne Hi, I tried this too. It seems like there is an error in your tests. Or shouldn't be let bestSmartphone = "iPhone" the solution for this challenge?

Pasan Premaratne
STAFF
Pasan Premaratne
Treehouse Teacher

Moritz Lang and Stephen Chicoine

Which version of the course are you taking? To me it says this challenge is associated with the "Build a Simple iPhone App with Swift" course. Is that the one being referred to?

That specific course is in Swift 1.0 which does not work anymore. Moreover it was removed from the library over a year ago, so I don't know how you have access to this course (if that is the one you're taking).

We also have Build a Simple iPhone App with Swift 2 and Build a Simple iPhone App with Swift 3. If you're taking either one of those, then this is a different issue and probably a bug

Moritz Lang
Moritz Lang
25,909 Points

Ah, okay. I thought it must be accessible because the challenge is accessible too. Also you can get to the whole course from within the challenge.

Pasan Premaratne
Pasan Premaratne
Treehouse Teacher

Cool, I'll follow up on this. In the mean time you should switch to the Swift 3 version!