I have a large Xcode project with only inline documentations, written by someone who has a very different coding style as I am used to.
My Question now is, if someone could give me something like a guideline on how to read and understand unknown Xcode projects as fast as possible?
What I tried:
First I ran the app. Then I tried to get threw the project method calls one by one starting (in the case of iOS) from the application:didFinishLaunchingWithOptions: delegate method. But soon I realized, that this will consume too much time. So I tried to use some tools:
I generated an UML graph with a tool called Graffle. It generated a flat graph with all Xcode files in it very similar to what they look like in the project navigator - which didn't help at all.
Then I tried to find a call-graph tool which hopefully illustrates all interactions of the written methods. Unfortunately I only found tools for other platforms. Then I started to use Instruments Profiler but never got to a point where it really helped me (maybe also because I didn't understand how to use it right for my approach).
So again, I would like to know how you specialists work yourself (step by step) threw an objective-c code you didn't write? Any links, book recommendations, sample test-codes, or others are greatly welcome as well. Thanks.
Firstly, I sympathize greatly. Sometimes understanding another's code takes longer than re-writing your self.
Personally, I would put NSLog statements at the start of all relevant methods. I would then starting at the applicationDidFinishLaunching comment out method calls trying to get the app to work step by step and gradually re-enable method by method.
In addition to the above suggestions, as a free tool, you could try Doxygen: www.doxygen.com
The output can include:
You could also give a spin to JetBrains AppCode (30-days trial): www.jetbrains.com
it aims to help in code assistance, navigation, analysis, transformation and refactoring.
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