How can I generate UML diagrams from Xcode4

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.


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.