How can I generate UML diagrams from Xcode4

52,492

Solution 1

Try Omnigraffle This has templates for UML diagrams.

If you drop an Xcode4 project file onto its dock icon, it will generate a UML diagram from that.

What it doesn't do is generate code from diagrams.

Solution 2

Search for "Xcode Design Tools" in Help. That will show you a tutorial that will walk you through creating a diagram.

EDIT >>>

It looks like the instructions are actually for XCode 3 and that UML Modeling was removed from XCode 4. The only modeling I could find in XCode 4 is Data Modeling: File>New>New File... and then look under 'Core Data'.

Class Modeling alternatives for Objective C

You might also want to check out Doxygen.

Solution 3

You can use yEd ... not the best solution and does not generate graphs as OmniGraffle can do but at least it can export in SVG and use GraphML files to store the data. (and it is fee)

http://www.yworks.com/en/products_yed_helpresources.html

Solution 4

Visual Paradigm can generate uml from objective c and back (haven't tried it yet, can't tell how well it does the job).

Solution 5

This may help you but I didn't personally tested,

https://developer.apple.com/legacy/library/documentation/DeveloperTools/Conceptual/XCodeDesignTools/XCodeDesignTools.pdf

The Xcode class modeling tool helps you to explore and understand the classes in your project, whether they’re written in Objective-C, C++, Java, or a mixture of those languages. It allows you to see class relationships (subclass and superclass relationships—including support for multiple inheritance in C++), protocols (or interfaces in Java), and categories. In the diagram view, color and text coding help you to quickly distinguish between classes, categories, and protocols, and between project and framework code. The visibility (public, private, protected) of member functions and variables is shown appropriately. (If you are not familiar with any of these terms, you should consult suitable programming texts.)

enter image description here enter image description here

Share:
52,492

Related videos on Youtube

user567
Author by

user567

Updated on March 25, 2020

Comments

  • user567
    user567 about 4 years

    I watched a video with xcode 3, that shows a button "Design" that displays a UML diagram, but I can't find how to do it with xcode 4.

    • Blitz
      Blitz almost 13 years
      would be very interested if something like this existed!
  • user567
    user567 almost 13 years
    i don't found it but i will surch in google , but it's possible ? to show diagram from an existing code ?
  • Snowcrash
    Snowcrash about 11 years
    Very neat. One annoying thing though - if you create methods/instance variables via @property's (I used Xcode4.6.1) it won't list them - even if you have methods and instance variables ticked in the import dialog.
  • Raunak
    Raunak about 11 years
    Omnigraffle understands only Objective-C files, how about C++?
  • joseph.hainline
    joseph.hainline over 10 years
    Without properties being recognized, it's a pretty useless UML diagram .
  • physicalattraction
    physicalattraction about 9 years
    Don't forget to mention the $99 price tag as a big disadvantage of OmniGraffle.
  • RY_ Zheng
    RY_ Zheng over 7 years
  • maddy
    maddy over 7 years
    crashed with multiple target x code project open with xcode 7.0
  • efimovdk
    efimovdk over 5 years
    The link responds with 404 and I wonder if this tool is still available in Xcode 10? I would really appreciate it, yet I cannot find it anymore