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 Weather App Fetching Data From the Web Constructing a URL

Danil Chaikin
Danil Chaikin
4,994 Points

URL (string:) and (string:relativeTo:) initialisers don't show up

when I type the following:

  let forecastURL = URL(string

I expect to get (string:relativeTo) initialiser, but the compiler doesn't auto-complete it for me. There are some other options, like (dataRepresentation:relativeTo:), but that doesn't work.

I'm really concerned about this. Would really like to find out why it happens!

1 Answer

Hi Danil,

You have to remember Xcode is an app itself and can sometimes be buggy. In this case you just have to type the initialiser yourself, or restart Xcode failing that.

No real issue.

All the best,

Mitch