Xcode project dependencies graph

Viewed 2474

I am new to Swift/Objective C and Xcode. I am having hard time to understand a project which i have downloaded from GitHub. The project is very big, written in both Objective C and Swift, also includes pods.

What I was trying to generate a dependency graph of the entire code base that includes Classes, Struct etc. So that i can understand the entire hierarchy of classes, structs, functions, protocols, delegates etc. in that project.

I did find some open source tool in the GitHub but those are not able to generate the entire dependency tree/graph. And also i was trying to find, whether there is anyway I could trace the classes, functions, delegates etc that is being called while executing the app in the simulator other than putting a breakpoints.

I would highly appreciate if some can help me to find the right tools, so that it can help me to understand a big code base.

3 Answers

By default, xCode has a Symbol Navigator as a part of it. It's not really what you're looking for but at least it's something.

enter image description here

When I've investigated the topic last time, I’ve found some tools for converting your iOS project to UML diagrams. And I should say it didn’t help a lot to understand the project structure, especially given the fact that UIKit likes inheriting very much. You’ll get a mass of useless information.

So, in my humble opinion, it’s much more useful just figure out the project architecture and how it implements the navigation between controllers.

I wrote a tool Build Graph for Xcode to visualise dependencies between modules, would be usefull if your app has separate packages or projects.

Related