I have encountered similar symptoms but with a different cause: if the path to the jucer file contains a symbolic link, Projucer emits corrupt file paths into the Xcode project.
For example, suppose your working directory is
This path is annoying so you create a symbolic link to shorten it:
> sudo ln -s /very/long/path/for/jucer /abslink
(Our sandbox paths get very long so we do this a lot.)
If you create and use the project using
/very/long/path/for/jucer then it works ok.
If you create the project using
/abslink then it fails: when you add a new file, save and open in Xcode, the new file is red because the file path is corrupted.
In the screen shot below, the path to SourceCode.cpp is
Interestingly, if you close the “bad” project (created using
/abslink) and reopen it via
/very/long/path/for/jucer, save and open in Xcode, it works.
And if you close the “good” project (created using
/very/long/path/for/jucer) and reopen it via
/abslink, save and open in Xcode, it works.
Perhaps the problem is associated with how the file gets added - the file in the “good” project appears to have a relative path, and the file in the “bad” project has an absolute path.
I hope this is enough information for someone to debug this.