I'm working on an iPhone project in Xcode and I'm using github as a repository. Recently, after a series of pushes and pulls from the repository, some of the files in the project are listed twice in Xcode. What I mean by this is that in the left panel of Xcode where it shows all of the files in the project, some of the files are listed twice.
I've done some experiments and the repeated files seem to be merely references to the same underlying file. If I change ViewController.h
the same changes appear in the other listed ViewController.h
file. Similarly, if I delete on the listed occurences, both of the copies disappear.
I've tried restarting Xcode, deleting the derived data and re-cloning
The Xcode project browser is just a collection of links to files and/or folders. If you right-click on each instance of ViewController.h
and choose "Show in Finder", they will likely both point to the same real file on your computer.
If that's the case, you can safely delete one of them from Xcode without any ill effects. Just make sure to do the default "Remove Reference" and not "Move to Trash".
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