{"id":18799125,"url":"https://github.com/marcoeidinger/swiftplantuml-xcode-extension","last_synced_at":"2025-04-05T21:09:53.443Z","repository":{"id":44411918,"uuid":"333604997","full_name":"MarcoEidinger/SwiftPlantUML-Xcode-Extension","owner":"MarcoEidinger","description":"Xcode Extension for generating class diagrams from Swift code (powered by PlantUML)","archived":false,"fork":false,"pushed_at":"2024-01-02T00:10:55.000Z","size":5068,"stargazers_count":448,"open_issues_count":1,"forks_count":24,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-29T20:07:59.187Z","etag":null,"topics":["macos","osx","planttext","plantuml","plantuml-generating","swift","xcode","xcode-extension","xcode-plugin","xcode-source-editor-extension"],"latest_commit_sha":null,"homepage":"https://github.com/MarcoEidinger/SwiftPlantUML","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarcoEidinger.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["marcoeidinger"]}},"created_at":"2021-01-28T01:03:17.000Z","updated_at":"2025-03-27T22:17:42.000Z","dependencies_parsed_at":"2024-01-02T01:44:20.309Z","dependency_job_id":null,"html_url":"https://github.com/MarcoEidinger/SwiftPlantUML-Xcode-Extension","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoEidinger%2FSwiftPlantUML-Xcode-Extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoEidinger%2FSwiftPlantUML-Xcode-Extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoEidinger%2FSwiftPlantUML-Xcode-Extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcoEidinger%2FSwiftPlantUML-Xcode-Extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcoEidinger","download_url":"https://codeload.github.com/MarcoEidinger/SwiftPlantUML-Xcode-Extension/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399885,"owners_count":20932880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["macos","osx","planttext","plantuml","plantuml-generating","swift","xcode","xcode-extension","xcode-plugin","xcode-source-editor-extension"],"created_at":"2024-11-07T22:14:09.597Z","updated_at":"2025-04-05T21:09:53.424Z","avatar_url":"https://github.com/MarcoEidinger.png","language":"Swift","funding_links":["https://github.com/sponsors/marcoeidinger"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./SwiftPlantUMLApp/Assets.xcassets/AppIcon.appiconset/128.png\" width=\"100\" max-width=\"50%\" alt=\"SwiftPlantUML\" /\u003e\n\u003c/p\u003e\n\n![Build](https://github.com/MarcoEidinger/SwiftPlantUML-Xcode-Extension/workflows/Build/badge.svg)\n[![Swift 5.3](https://img.shields.io/badge/swift-5.3-orange.svg?style=flat)](#)\n[![Twitter](https://img.shields.io/badge/twitter-@MarcoEidinger-blue.svg)](http://twitter.com/MarcoEidinger)\n# SwiftPlantUML.app\n\nGenerate and view a class diagram for Swift code in Xcode or from the Finder.\n\nUse the hosting macOS application to configure the diagram visualization.\n\nThe Source Editor Extension (as well as the Action extension) makes use of [`SwiftPlantUML`](https://github.com/MarcoEidinger/SwiftPlantUML) Swift package.\n\nTo generate a large diagram from a project with Swift files across folders then I recommend using `SwiftPlantUML` as a command-line tool.\n\n## Features\n\n### Xcode\n- [X] 📊 Create class diagram from Swift file    \n- [X] 🔦 Create class diagram from selected Swift code\n\n![SwiftPlantUML Xcode Extension - Usage Demo](.assets/usage.gif)\n\n### Finder\n- [X] 📊 Create class diagram from selected Swift file(s)  \n\nhttps://user-images.githubusercontent.com/4176826/218329052-b03ec650-d845-46a2-a31b-6d3817add52a.mp4\n\n## Example\n\n![SwiftPlantUML Xcode Extension - Usage Demo](.assets/usage.gif)\n\n## Install\n\nHomebrew\n\n```bash\nbrew install swiftplantumlapp\n```\n\n\u003cimg width=\"565\" alt=\"Installation through Homebrew\" src=\"https://user-images.githubusercontent.com/4176826/150718736-f94d9e81-076e-4254-906f-be68518d0450.png\"\u003e\n\n*Alternative*\n- Download latest *SwiftPlantUML* package from the [Releases](https://github.com/MarcoEidinger/SwiftPlantUML-Xcode-Extension/releases).\n- Copy *SwiftPlantUML* to your *Applications* folder.\n\n## Enable Extension\n- Launch *SwiftPlantUML*.\n\n  \u003cimg width=\"712\" alt=\"SwiftPlantUML user interface\" src=\"https://user-images.githubusercontent.com/4176826/150644606-a4eb8681-d9dc-46d9-87b1-4522ed88668e.png\"\u003e\n  \n- To use in **Xcode**: enable extension in \u003ckbd\u003eSystem Preferences\u003c/kbd\u003e \u003e \u003ckbd\u003eExtensions\u003c/kbd\u003e \u003e \u003ckbd\u003eXcode Source Editor\u003c/kbd\u003e \u003e select \u003ckbd\u003eSwiftPlantUML\u003c/kbd\u003e\n\n  ![SwiftPlantUML Xcode Extension - Installation](.assets/installation.png)\n\n- To use in **Finder**: enable extension in \u003ckbd\u003eSystem Preferences\u003c/kbd\u003e \u003e \u003ckbd\u003eExtensions\u003c/kbd\u003e \u003e \u003ckbd\u003eFinder\u003c/kbd\u003e \u003e select \u003ckbd\u003eOpen Swift Class Diagram\u003c/kbd\u003e\n\n  ![SwiftPlantUML Xcode Extension - Installation](.assets/installation.png)\n\n## Configure\n\n*Optional*:\n\n  \u003cimg width=\"512\" alt=\"Preferences - Elements\" src=\"https://user-images.githubusercontent.com/4176826/150644620-19f13392-08f2-4dba-b95a-0c9a002a5272.png\"\u003e\n\n  \u003cimg width=\"512\" alt=\"Preferences - Members\" src=\"https://user-images.githubusercontent.com/4176826/150644626-7a566c4b-d795-432c-9a2e-ec29d2c1ba42.png\"\u003e\n\n  \u003cimg width=\"512\" alt=\"Preferences - Others\" src=\"https://user-images.githubusercontent.com/4176826/218329326-6953799c-faa0-4de0-93a3-9d5856587e8c.png\"\u003e\n\n## Troubleshooting\n\n### The command \"Open editable diagram in browser\" is still busy\n\nXcode Source Code Extension initialization might take up ~ 30 seconds on initial launch.\n\nIf the prompt does not appear within 60 seconds \n\n![image](https://user-images.githubusercontent.com/37135317/118424310-f77dd000-b701-11eb-9b59-cd3c964e1885.png)\n\nthen check for a crash report related to XPC service in Console app of your MacOS.\n\n\u003cimg width=\"1726\" alt=\"CrashReportXPCServiceExample\" src=\"https://user-images.githubusercontent.com/4176826/134083329-722a101a-4ec6-428b-9ee5-bcffec0784a8.png\"\u003e\n\nIf you see such crash report related to `fatal error: Loading sourcekitd.framework/Versions/A/sourcekitd failed` please check the installation path of Xcode. If it's installed under `/Applications/Xcode.app`, please run:\n\n```\nsudo xcode-select -s /Applications/Xcode.app/Contents/Developer\n```\n\nIf it's installed elsewhere, please replace the `/Applications/Xcode.app` path in the command above with the location where you've installed Xcode.\n\n\n## Technical Details\n\nThis 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.\n\n# Acknowledgements\n\nThese awesome blog posts helped me to dive into Xcode Source Editor Extensions and XPC services\n\n- https://www.vadimbulavin.com/xcode-source-editor-extension-tutorial/\n- https://nshipster.com/xcode-source-extensions/\n- https://ilya.puchka.me/xcode-source-editor-extension-superpowered-with-sourcekitten/\n- https://www.objc.io/issues/14-mac/xpc/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoeidinger%2Fswiftplantuml-xcode-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcoeidinger%2Fswiftplantuml-xcode-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcoeidinger%2Fswiftplantuml-xcode-extension/lists"}