If you’ve been faithfully downloading all the Xcode 6 betas to work with the latest version of Swift, you’re probably used to dealing with new betas breaking your code. In many cases, it’s due to changes in Swift, but once in a while, it’ll be completely unrelated to the language.
When I tried to compile my simple shoot ’em up game using Xcode 6 beta 6, I kept getting a couple of errors with text like this:
Apple Mach-O Linker error, Undefined symbols for architecture
You’re pretty insulated from the details of compiling and linking in Swift, and I hadn’t modified the code since I last ran it in beta 5, which left Xcode as the thing that changed and broke the build. A quick search on Stack Overflow revealed that deleting the DerivedData directory, which contains dSYM data (debug symbols — information used during the build process and for debugging), fixes the problem.
The default location for DerivedData is:
Wait! I can’t find the Library folder in my home directory!
The Library folder is hidden by default in order to prevent non-technical users from messing around with it. However, as a developer, there are times that you’ll need to access it. Here’s how you make it visible within Finder in Mavericks:
- Open a Finder window.
- Go to your Home folder (the keyboard shortcut is command–Shift-H).
- In the View menu, select Show View Options (the keyboard shortcut is command-J).
- Make sure that the Show Library Folder checkbox is checked.