Author and share great documentation for your Swift packages and frameworks.

Posts under DocC tag

25 Posts
Sort by:
Post not yet marked as solved
1 Replies
347 Views
Can DocC exclude some struct like swiftUI previews?
Posted Last updated
.
Post marked as solved
2 Replies
542 Views
I found out docC is missing search field in hosted documentation, that is currently for example in documentation tool jazzy (https://pspdfkit.com/blog/2016/adding-live-search-to-jazzy/). This is useful feature that should have every documentation. I would consider it as one of the vital feature for every documentation. Could we expect this feature someday ? Thanks for answer.
Posted
by Gadireddi.
Last updated
.
Post not yet marked as solved
1 Replies
352 Views
When the package, framework, and a type have basically the same name, how do I get DocC to render my custom landing and type pages instead of the defaults? Sometimes I get my landing page to render, sometimes the data type's, never both, often neither Some readers want more of the story: Use case: My package is named SlothWatcher. One of the source files is SlothWatcher.swift, which implements enum SlothWatcher, which serves as a namespace for various constants and functions. I think it's totally reasonable (and common?) to: Name the package SlothWatcher. Name the backbone namespace enum SlothWatcher. Name the file defining the backbone namespace SlothWatcher.swift Enter DocC Now I want DocC to generate documentation. DocC adds some requirements, which are all or some combination of: The docc documentation catalog must be named SlothWatcher.docc. The landing page for the documentation catalog, if overriden, must be named SlothWatcher.md. The first line of that file must be # SlothWatcher (name in double-backticks). All documentation referring to the enum docs must use SlothWatcher/SlothWatcher. Certainly in body text, and I've tried it both ways as the header for the enum extension. If there's a naming rule for the enum extension file, I haven't found it. (Other than that you can't easily put a slash into a file name.) I've lost track. Some of these may not be required at all, given that Xcode defaults none of them. How, if at all, can I get this into working order?
Posted
by fritza.
Last updated
.
Post not yet marked as solved
1 Replies
534 Views
In this documentation: distributing-documentation-to-external-developers, it seems that .doccarchive file can only be opened directly in Xcode or hosted in a website. In my circumstance, I am distributing my swift static framework by turning on BUILD_LIBRARY_FOR_DISTRIBUTION. There are some symbols such as struct/class/function/property, and they must be marked as public to meet the requirement of compiler. But I really discourage my clients to use these symbols. One of the approach is to remove them from the code completion suggestion of Xcode. In another documentation: documenting-a-swift-framework-or-package, it is said that: The compiler integrates directly with Xcode to enhance your existing workflow, including code completion, Quick Help, and more. I am wondering if it is possible that I ship my framework with a .doccarchive file. And when my clients use my binary framework, Xcode can use my .doccarchive file when doing code completion and showing quick help of the code?
Posted Last updated
.