/SwiftPlantUML-Xcode-Extension

Xcode Extension for generating class diagrams from Swift code (powered by PlantUML)

Primary LanguageSwiftMIT LicenseMIT

SwiftPlantUML

Build Swift 5.3 Twitter

SwiftPlantUML-Xcode-Extension

Generate and view a class diagram for Swift code in Xcode with this extension.

This Source Editor Extension makes use of SwiftPlantUML Swift package. You can also use SwiftPlantUML as a command-line tool.

Features

  • 📊 Create class diagram from Swift file
  • 🔦 Create class diagram from selected Swift code

Example

SwiftPlantUML Xcode Extension - Usage Demo

Installation

  • Download latest SwiftPlantUML package from the Releases.
  • Copy SwiftPlantUML to your Applications folder.
  • Launch SwiftPlantUML once. You can close it immediately afterwards (i.e. Quit from Dock).
  • Go to System Preferences > Extensions > Xcode Source Editor > select SwiftPlantUML

SwiftPlantUML Xcode Extension - Installation

Technical Details

This Source Editor Extension makes use of XPC service to run the app sandboxed and use SwiftPlantUML (and its dependency SourceKitten). Source Editor Extensions using SourceKitten (either directly or indirectly) have to either run in a non-sandboxed app (and could not be distributed via the App Store) or use XPC service to outsource the use of SourceKitten to a different process.

Acknowledgements

These awesome blog posts helped me to dive into Xcode Source Editor Extensions and XPC services