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

孤街醉人 提交于 2019-12-03 08:50:01
Nate Petersen

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

Paul Peelen

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!