Hacker News new | ask | show | jobs
by w4 3928 days ago
"Clean Build Folder" is basically the "turn it off, then turn it back on" of Xcode. Almost anytime you get a weird compiler error on a project that compiled fine moments ago, it's solved by "Clean Build Folder."

Definitely a good trick to know.

1 comments

Or for those who prefer automating, add this to ~/.bash_profile:

   alias nuke="rm -rf ~/Library/Developer/Xcode/DerivedData/"
That's pretty drastic. That nukes the derived data folder of all your Xcode projects. If you work on more than 1, using this to solve a problem in 1 will lead to needing to rebuild all of your projects. That seems a bit extreme for an issue in a single project.
I always advice people to put their DerivedData and build folder somewhere accessible. You can change it settings, don't use the default setting.
Good tip. As someone with quite a small main HDD I'll do this ASAP.