Create class diagram from already existent iphone code

14,507

Solution 1

Yes, you can use Doxygen:

  1. Install Doxygen (with MacPorts: sudo port install doxygen).

  2. Get a script like this and change the first lines to match your configuration.

  3. Download these files and edit the Doxygen file so it says HAVE_DOT=YES and UML_LOOK=YES.

It will then generate and install a docset that you can read from the documentation browser, or just right click and show contents from Finder.


Or, if you want a graph of dependencies check: https://github.com/nst/objc_dep It uses graphviz.

Solution 2

See also OmniGraffle of all things. If you open an Xcode project with it, it will generate a full class diagram. It can be fairly overwhelming for a large project.

Share:
14,507
Simon D.
Author by

Simon D.

Updated on July 19, 2022

Comments

  • Simon D.
    Simon D. almost 2 years

    does anybody know, how i could create automatically a UML class diagram from an already existent iphone project. Is it possible?

    Thanks in advance.

  • Oh Danny Boy
    Oh Danny Boy almost 11 years
    Crashes every time on larger projects, regardless of trial or paid.
  • ThomasW
    ThomasW almost 11 years
    My experience with OmniGraffle is the same as Oh Danny Boy's.
  • Mikhail Vasilev
    Mikhail Vasilev over 10 years
    Same here. I could get it working only when I created dummy project and imported only files I need there. Crashes very often. Also the diagram it generates is absolute garbage. Does not show @property in diagram. Bad bad tool.
  • Andrew Park
    Andrew Park about 9 years
    This happened for me when i tried to have it also import "frameworks", but unchecking that, it stopped crashing
  • Rob
    Rob about 2 years
    The links in this post are dead. Are there updated links?
  • Jano
    Jano about 2 years
    I fixed the links, Idk if that method still works, it’s 11 years old and intended for Objective-C projects. These days I make diagrams manually with OmniGraffle, tho the technology pieces to automate this process are already floating around.