ios - 如何使用 HeaderDoc 在 Xcode 中为 SWIFT 文件生成 HTML 文档?

标签 ios shell swift xcode6 headerdoc

我尝试使用 HeaderDoc 在 Xcode 中记录我的 Swift 项目,但只处理文件“.h”而忽略文件“.swift”

这是我的 swift 文件:

/// test
///
/// :param: ann blabla
func testFunc( ann: Foo ) { .. }

我在终端中运行以下命令:

headerdoc2html -o ~/Desktop/docum Ninja

This is the error:

    Documentation will be written to /Users/me/Desktop/docum
    HTML output mode.
    No valid input files specified. 

        Usage: headerdoc2html [-dq] [-o <output directory>] <input file(s) or directory>.

    iMac:MyApp me$  headerdoc2html -o ~/Desktop/docum Ninja/

    Documentation will be written to /Users/me/Desktop/docum
    HTML output mode.
    DIR Ninja/
    ======= Parsing Input Files =======

    Processing Ninja/Test.m
        Skipping. No HeaderDoc comments found.

    Processing Ninja/-Bridging-Header.h

最佳答案

是的...

截至目前,HeaderDoc 无法使用 headerdoc2html 将 Swift 内联文档转换为 HTML 文件。您和所有人(包括我自己)将不得不遗憾地等待。


其他选项

所以“三大”iOS 代码文档工具是 HeaderDoc,AppleDoc , 和 Doxygen .遗憾的是,这三个都不支持 Swift。好消息:AppleDoc v3.0 相对较快推出,另外两个可能(可能)也会更新。 AppleDoc 是开源的,因此如果您精通代码,则可以对其进行调整以满足您的需求(使用 swift 和所有爵士乐)

编辑:

我在 AppleDoc 的 Github 页面上发表了评论,并收到了一些回复。主要是,2014年10月16日苹果正在开发布会。在这次 session 之后,AppleDoc 人员(女士们?)将开始向 AppleDoc 3.0 添加 Swift 支持,并将在某个时候发布。


说起爵士乐

Jazzy 现在 (!) 可以为 Swift 生成 HTML 形式的文档 (!!) 我很难设置它,而且它的格式是非正统的,但如果你能别等三巨头更新,说不定就适合你。

祝你冒险愉快。

ZR

关于ios - 如何使用 HeaderDoc 在 Xcode 中为 SWIFT 文件生成 HTML 文档?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26061480/

相关文章:

macos - 在 mac os x 上从 iterm2 中隐藏 name@name-macbook-air

swift - UITapGestureRecogniser 添加目标不起作用

iphone - UIview 的特定矩形可以有不同的 alpha..?

ios - 动画 CATextLayer 的 foregroundColor 属性

ios - 如何同时显示聊天 UI 的文本和按钮

linux - os.environ 不包含 HOST 变量

c - 在用户创建的 Shell 中实现重定向工作不正常

ios - 通过点击 Reactive Cocoa 4 中的 UIButton 获取信号

ios - iOS 应用程序上的 Swift 按钮错误,但在 playground 中没有

ios - 执行 "pod install"时 Podfile 错误?