Xcode cannot follow-symlinks? Atom does

So weird issue. I have source files that I share amongst projects. I symlinked them and Xcode builds and runs fine.

However, if I try and edit the file in Xcode, Xcode cannot save it and throws an error: The document “MainScene.h” could not be saved. The file doesn’t exist.

However, other editors can save just fine.

Anyone have an idea of what is going on?

Instead of sym-linking files, symlink folders that contain your files and then add the folder as a reference or group and it should work.

For some reason Xcode doesn’t like sym-linked files, but is ok with sym-linked folders.