I added a bunch of files at different times to my project then later deleted them, and I forgot to make Xcode trash the files in addition to the references. Since Xcode doesn't store the grouped files in separate directories, I now have hundreds of files and folders all together in my project directory, and it would be a pain to sift through and take out the ones I don't want.
I'm using Xcode 5. How do I make it automatically delete all files in my project directory that aren't actually part of the project? Note: I am not referring to files referenced in my source code, just the Xcode project itself.
I had the idea of using the built-in git functionality to solve this by pushing the project to Github, deleting the local copy, then cloning it back. But apparently, removing referenced files in Xcode won't prevent them from being committed. If there's some option to make Xcode only include referenced files in the git repository, that would work too (even though it's a hack workaround).
AFAIK, there are no trivial way to find unreferenced files in an Xcode project.
I wrote a tool to do it though.
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