Is there a way to list all files and their targets in Xcode? Is there a way to list all files and their targets in Xcode? shell shell

Is there a way to list all files and their targets in Xcode?


My answer on this other thread shows you how to see all files that are not part of a target:

https://stackoverflow.com/a/12867723/591586


I did as Paul suggested and wrote a python script that inspects the .pbxproj and lists all the files and the targets they are included in.You could easily modify that script so that it highlights the files that are not included in specific targets.https://github.com/laurent74/XPFAT


This question has been asked before, but neither did that question got an answer.

As far as I know, XCode does not have any build in support for comparing targets. However, the project is nothing more than an set of XML files... very detailed XML files though.. but still XML. What you could do (this is not something I recommend though) is read through the XML files of the project and try to understand how they are build.

I know this is not the answer you are looking for, but it might be a workaround.

Update
I read though project.pbxproj of a test project with two targets, and it seems as if the project is build up into references. Which is smart since one wouldn't have a huge file if you have many targets. However, it does mean that its really hard to read.