Unable to generate DocC documentation

Hi there!

I've been trying to play around with the DocC documentation (amazing addition, my favourite for sure this year). Sadly, I'm not able to build documentation for the project.

I'm running macOS 11.4 and the Xcode 13 beta (13A5154h). I've tried this on a couple of existing projects and a new fresh one.

When I click product -> build documentation it will do a build action and open the documentation for the page I had open last and show all Apple documentation, but I am unable to see any documentation for my project.

I am able to add a documentation catalog. That creates the 'index' and a resources folder, which is empty.

Is this a known issue, or an issue on my end?

Answered by Documentation Engineer in 678048022

Reposting as an answer in case this is what's going on:

DocC in Xcode supports Swift frameworks and packages. If your project is an app, it won't build documentation for those symbols. If you set up your code in a framework or a Swift package, you should start seeing those docs in the documentation window when you build documentation.

Hi iikeli, DocC supports Swift packages and frameworks. Does your Xcode project contain any frameworks or packages?

If your project is an app, DocC in Xcode won't build documentation for those symbols. If you set up your code in a framework or a Swift package, you should start seeing those docs in the documentation window when you build documentation.

Accepted Answer

Reposting as an answer in case this is what's going on:

DocC in Xcode supports Swift frameworks and packages. If your project is an app, it won't build documentation for those symbols. If you set up your code in a framework or a Swift package, you should start seeing those docs in the documentation window when you build documentation.

I have tried building documentation for the SlothCreator using Xcode 13 beta and Mac OS Monterey beta and it doesn't open the documentation window (as per the demo). It just opens the Developer Documentation window. I guess that the developers have a later version of Xcode to be released rsn.

For those who are generating document articles for Swift package. Please note swift-tools-version should be at least 5.5 in Package file.

I am posting this as an answer, even though it is just another gripe. The reason is because I can't seem to track my comments; only answers. This is what I posted in a comment, above:

Sadly, this does not work for me, and there's absolutely ZERO indication, as to why.

Even the sample Apple SlothCreator package example does not work. I am using the latest ship Xcode (13.2.1), and I downloaded the sample (From the page linked with instructions), fifteen minutes ago. I followed the example in this page, verbatim. It simply opens the Apple documentation viewer, with the standard built-in docs.

My app's docs are nowhere to be seen. I have been writing frameworks and packages in Swift for years, and documenting with Jazzy, so all my code already has the triple-slash/double-star markdown notation. I can't get documentation to appear for any of my projects (they have all been upgraded to 5.5, for some time).

I'm quite sure that I'm doing something wrong, but it is impossible to tell what it is, that I am doing wrong.

OK. Now this is an answer.

It's really, really dumb, and I'm not the dummy.

It looks like the documentation screen hangs onto the last filter that was used, so if you (as do I) like to use the Quick Help Navigator, and "Open in Documentation," you'll generally have a value in the "Filter" entry, and the bottom of the Navigator.

If there is anything at all in there, it will block display of the documentation.

I will register a bug, saying that this should be cleared, when opening as a result of the "Build Documentation" step.

Unable to generate DocC documentation
 
 
Q