Hello, I’m currently learning about SwiftPM plugins.
From the tutorial, I learned about the BuildToolPlugin type, but I couldn’t find any detailed API documentation for it or other related types.
I searched on Apple’s website and the Swift Package Index, but it seems that API documentation for PackagePlugin and XcodeProjectPlugin is not available there.
Is there a place where the API documentation for these is available?
At the moment, I can only try “Quick Help” or “Jump to Definition” in Xcode, but it takes some time and effort...
@nukka123 None of the DocC archives from Swift Package Manager are hosted on Swift Package Index, although we're working to get content hosted on swift.org. At the moment, the general Package Manager Docs are up at docs.swift.org, but not yet linked through from swift.org (that PR is pending). This is "just" the main set of docs currently:
We recently added a DocC catalog for PackagePlugin, which is merged into Swift Package Manager's main branch, so the good news is you can at least build & view that locally, and I'm prototyping out leveraging a new feature of Swift DocC to publish the docs of all 3 archives together as a merged DocC Archive: main docs, PackageDescription, and PackagePlugin.
Until we get that fully available and published, I'd recommend cloning the SwiftPM project locally and building your own copy of the docs to be able to review:
git clone https://github.com/swiftlang/swift-package-manager
cd swift-package-manager
swift package --disable-sandbox preview-documentation --target PackagePlugin
After which, you should be able to view the docs at http://localhost:8080/documentation/packageplugin
2 Likes