Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Build a Playlist Browser with Swift Refactoring Our Code Determining Playlists Programmatically

Heads up for anyone without auto-complettion, a lot of errors and all black code.

Hey guys,

When I started adding Pasan's code from this video I noticed I wasn't getting auto-completion, I was getting a lot of errors and all the new code was black because Xcode wasn't recognizing the new code. As you can imagine I was looking all over the place to find out where I went wrong.

Actually nothing is wrong and you just have to restart Xcode. In the previous video Pasan had us delete various things so I think somewhere along the line Xcode didn't like something. Not necessarily orphans but Xcode needed a cleaning obviously.

As soon as I restarted Xcode saw all my code and everything was nice and colourful again. Good luck.

Joe Susnick
Joe Susnick
5,042 Points

Sometimes cmd-shift-k to clean the build will "fix" some compiler errors. I usually try this before restarting.

1 Answer

Roberta Voulon
Roberta Voulon
5,792 Points

I have been having major code completion issues with Xcode, up to the point of Xcode freezing when I was having too many projects open... for anyone who is having long-term code completion issues, here's what I discovered:

1) Verify that you haven't accidentally toggled it off: Ctrl + Space will toggle it off or on for you.

2) This post on StackOverflow did the trick for me: http://stackoverflow.com/questions/25883905/xcode-6-swift-code-completion-not-working (I had to empty the Derived Data folder and also delete the cache for it to work again -- see instructions)