Unable to generate DocC 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.

  • 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.

Add a Comment

Apple Recommended

  • Ah, I see. Any idea when it is possible to create documentation for apps too?

  • I have tried building documentation for the SlothCreator package 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. 

  • I can see the docc file in build folder, but I didn't see it in doc view after product->build documentation

Replies

  • Ah, I see. Any idea when it is possible to create documentation for apps too?

  • I have tried building documentation for the SlothCreator package 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. 

  • I can see the docc file in build folder, but I didn't see it in doc view after product->build documentation

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.

  • Glad to hear you got it sorted out. Please post your bug number once you’ve filed it.

Add a Comment