This year, Apple released a new feature for the Swift Package Manager: Swift Package Plugins. We can now write two kinds of plugins that are automatically integrated with Xcode:
- Build (and pre-build) Plugins.
- Command Plugins.
I already talked about building plugins in a couple of articles: “Implement Your First Swift Package Build Plugin” and “How to Use Xcode Plugins in Your iOS App”.
Today, I want to share with you which steps are required to create a Command Plugin. The developer experience for these plugins is not great, so I want to share also a technique to debug them.