安装appledoc
1.下载源码后运行即安装
如果提示:garbage collection is no longer supported需要删除Building setting中GCC_ENABLE_OBJC_GC的requied。
另外:git安装亦可(如下),不过遇到上述问题就不好办。
git clone git://github.com/tomaz/appledoc.git cd appledoc sudo sh install-appledoc.sh
2.在终端中使用cd命令进入项目的文件夹,然后执行下列命令:
appledoc --output ./doc --project-name testPname --project-company "testCname" --company-id "com.test.id" .
–output ./doc:设置输出目录为“./doc”。
–project-name testPname:设置项目名为"testPname"。
–project-company "testCname":设置公司名为“testCname”。
--company-id "com.test.id":设置公司id为“com.test.id”。
.:当前目录。
3.进入xcode-->help-->Documentation and API Reference就可以看到自己的
4.safari打开:
file:///Users/****/Library/Developer/Shared/Documentation/DocSets/com.test.id.testPname.docset/Contents/Resources/Documents/index.html
5.命令参考:appledoc --no-create-docset --output ./doc --project-name SychipRpcLib --project-company "Sychip" --company-id "com.sychip.SychipRpcLib" --ignore "*.m" --ignore "GCD*.h" .