Here are the details of my problem:
I have a directory structure that looks like:
where ios-src
is all my project and source files and ios-libs
is where all my git submodules live.
When I clone the project to a different machine, all the files in the ios-libs directory show up as red (or missing) in XCode (v4.3.2), however the files are present on disk.
If I delete the files from XCode and re-add them, it DOES NOT fix the problem, they are still red and the project doesn't compile.
The directories are all marked as Relative to Group
.
If I choose the file in the inspector I get this:
Which reveals the wrong relative path. If I choose the browse button (to the right of the path) and correct it I get the correct relative path:
That fixes it until I go to back to the original (my home) machine. Also, if I move the ios-lib
directory to be under ios-src
it fixes the problem, but that is a workaround and I want to know the solution.
It seems that I have something setup wrong on my home computer as it only seems to happen when I create projects there. If I create the project on any one of my other computers, the projects work on everyone one of my machines including my home one. They are all running Lion and the same XCode version.
Any ideas on what I can do to resolve this problem is greatly appreciated. I have spent a good amount of time trying to figure it out to no avail.
Change the Relative to Group to Relative to Project.
Groups aren't necessarily physical directories. They are simply a collection of references to files in your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With