简体   繁体   English

为XCODE项目生成Apple Docs

[英]Generate Apple Docs for XCODE project

I am trying to generate apple docs for one of my projects. 我正在尝试为我的一个项目生成苹果文档。 I am using the following commands to generate the docs... 我使用以下命令生成文档...

headerdoc2html -o OutPutDirectory InputDirectory

I am getting the following message... 我收到以下消息......

Processing /Users/Ankit/Documents/Projects/pos/trunk/TestProject/TestProject/Test.h
    Skipping. No HeaderDoc comments found.
No default encoding.  Guessing.  If date formats are wrong, try
specifying an appropriate value in the LANG environment variable.

Any help is appreciated. 任何帮助表示赞赏。

I had same issue. 我有同样的问题。 I fixed it by changing all 我通过改变所有来修复它

/// Comments

And

/**
 * Comments
 */ 

Comments to 评论

/*!
 * Comments
 */

And everything worked fine for me. 一切都适合我。

The LANG environment variable is not set in any location that your Xcode can reach. LANG环境变量未在Xcode可以到达的任何位置设置。 Probably because it wasn't set in your build settings. 可能是因为它没有在您的构建设置中设置。

Running the command below will print all environment variables, LANG will not be among them. 运行以下命令将打印所有环境变量, LANG将不在其中。

xcodebuild -project Path/To/Your.xcodeproj -target "YourTarget" -showBuildSettings

Environment variables are managed in your schemes under the "Environment Variables" table, but I haven't had luck changing them there. 环境变量在您的方案中的“环境变量”表中进行管理,但我没有运气在那里更改它们。 What I eventually did (since my headerdoc2html call was in a build script in my Build Phases of my Documentation target) was add this line to the top of my bash script: 我最终做了什么(因为我的headerdoc2html调用是在我的文档目标的构建阶段中的构建脚本中)将此行添加到我的bash脚本的顶部:

export LANG=en_US.US-ASCII

The message went away after that. 之后消息消失了。


My total script, for the curious. 我的总剧本,对于好奇。

export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/usr/bin/headerdoc2html -o ~/Development/Path/To/My/Documentation ~/Development/Path/To/My/Project/Headers
/Applications/Xcode.app/Contents/Developer/usr/bin/gatherheaderdoc ~/Development/Path/To/My/Documentation

(Xcode Version 4.6.3) (Xcode版本4.6.3)

您还可以使用-j标志启用javadoc语法,而不必更改任何文档代码。

headerdoc2html -j -o OutputDirectory InputDirectory

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM