Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I delete all unreferenced files in an Xcode project?

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).

like image 645
sudo Avatar asked Feb 26 '14 05:02

sudo


1 Answers

AFAIK, there are no trivial way to find unreferenced files in an Xcode project.

I wrote a tool to do it though.

like image 59
Frizlab Avatar answered Oct 04 '22 09:10

Frizlab