How to generate DocC documentation for a binaryTarget in SPM

If you are creating an SPM package with binary targets and you execute: swift package generate-documentation I get an empty doccarchive as a result.

How can we enable docc docs for binary targets? Do we need to compile the docs when we build the xcframework and embed it in the xcframework somehow? Or can it be generated from normal xcframework? Or is there some other way? What are the best practices for documenting binaryTargets in an SPM package? Is there a way to get the versioned docs hosted on http://swiftpackageindex.com/ ?

1 Like