*一、Xcode 插件下载:*

VVDocumenter下载:https://github.com/onevcat/VVDocumenter-Xcode

Xcode经常使用插件下载:http://pan.baidu.com/s/1sjLnUFj

*二、VVDocumenter安装方法:*

The best way of installing is by Alcatraz. Install Alcatraz followed by the instruction, restart your Xcode and press ⇧⌘9. You can find VVDocumenter-Xcode in the list and click the icon on left to install.

If you do not like the Alcatraz way, you can also clone the repo. Then build the VVDocumenter-Xcode target in the Xcode project and the plug-in will automatically be installed in ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins. Relaunch Xcode and type in /// above any code you want to write a document to.

If you want to use other text beside of /// to trigger the document insertion, you can find a setting panel by clicking VVDocument in the Window menu of Xcode. You can also find some other useful options there, including setting using spaces instead of tab in the panel or changing the format of generated documentation.

开发中我遇到的问题:下载Xcode经常使用插件并解压至~/Library/Application Support/Developer/Shared/Xcode/Plug-ins,Xcode6.2下其他插件均可使用。只有VVDocumenter不行。

百思不得其解。

后来安装了Alcatraz,VVDocumenter才干使用。

*三、appledoc安装方法:*

  1. appledoc下载:https://github.com/tomaz/appledoc
  2. appledoc安装:

The recommended way is to clone GitHub project and compile the tool from Xcode. As cloning GitHub project will create the link to the main repository, it greatly simplifies future upgrading too. To install, type the following in the Terminal:

git clone git://github.com/tomaz/appledoc.git

This creates appledoc directory. Within you can find appledoc.xcodeproj Xcode project; open it and compile appledoc target - this should work out of the box, however your system must meet minimum system requirements, see below. I recommend you copy resulting appledoc executable from build directory to one of the directories in your path (echo $PATH) to make it easily accessible.

Optional: Appledoc is selfcontained and contains the necessary template files. IF you want to modify these default from Templates subdirectory to one of the expected locations:

~/Library/Application Support/appledoc
~/.appledoc

You can also use install-appledoc.sh script to perform quick installation. Open Terminal and switch to appledoc directory. Type following command:

sudo sh install-appledoc.sh (if you need templates add ‘-t default’)

It compiles appledoc and installs its binary to /usr/local/bin and templates (if wanted) to ~/.appledoc by default. You can override this directories with -b and -t options respectively. For example:

sudo sh install-appledoc.sh -b /usr/bin -t ~/Library/Application\ Support/appledoc

Alternatively with Homebrew:

brew install appledoc

Homebrew does not install templates by default.

*四、appledoc整合Xcode:*

  1. Select top of your project in Project Navigator
  2. Click Add Target
  3. Depending on your project type (iOS or OS X) choose Aggregate Template
  4. Create new target. I suggest to call it Documentation
  5. Click on Build Phases and add new Build Phase based on Script
  6. Paste the script below into the script window
  7. Adjust variables in section “Start Constants” as required
  8. Uncomment correct ‘target’ for your project and comment out another one depending on your project type.
  9. Adjust path to appledoc binary and appledoc’s command-line switches if required
  10. When you ready to generate a docset from your project, build Documentation target.
  11. Docset will be installed into new loction and will become available to Xcode immediately.
  12. To refresh Quick Help (ALT+Click) and (ALT+double-click) you may need to restart Xcode to refresh its index cache.

Below is a working script that can be added to the Xcode Build Phases, Run Script

#appledoc Xcode script
# Start constants
company="ACME";
companyID="com.ACME";
companyURL="http://ACME.com";
target="iphoneos";
#target="macosx";
outputPath="~/help";
# End constants
/usr/local/bin/appledoc \
--project-name "${PROJECT_NAME}" \
--project-company "${company}" \
--company-id "${companyID}" \
--docset-atom-filename "${company}.atom" \
--docset-feed-url "${companyURL}/${company}/%DOCSETATOMFILENAME" \
--docset-package-url "${companyURL}/${company}/%DOCSETPACKAGEFILENAME" \
--docset-fallback-url "${companyURL}/${company}" \
--output "${outputPath}" \
--publish-docset \
--docset-platform-family "${target}" \
--logformat xcode \
--keep-intermediate-files \
--no-repeat-first-par \
--no-warn-invalid-crossref \
--exit-threshold 2 \
"${PROJECT_DIR}"

注:target=”iphoneos”,引號里内容换成你的工程target名,否则build会有错。Build成功后,在Xcode打开 -> help -> Documentation And API Reference,就可以查看生产的工程帮助文档。此方法一。

*五、appledoc用法(命令行控制)*

在命令行工具cd到工程所在路径,然后键入

appledoc   --output ./doc --project-name spring3g_v525_test  --project-company "spring3s" --company-id "com.ch" .

或者

appledoc --no-create-docset  --output ./doc --project-name spring3g_v525_test  --project-company "spring3s" --company-id "com.ch" .

这样在工程文件夹下即生成doc文件夹。

doc文件夹下有凝视网页文档。

注:”.“ 和前面的符号一定要加 空格 否则就会报错。–company-id參数也要传。加入–no-create-docset參数,会在./doc文件夹下生成网页文档。

./doc文件夹下docset-installed.txt文件记录了生成help Documentation保存路径。

*六、appledoc Demo*

Demo下载:https://github.com/JarryChang/AppledocDemo

*七、參考链接:*

  1. https://github.com/onevcat/VVDocumenter-Xcode
  2. https://github.com/tomaz/appledoc
  3. https://github.com/tomaz/appledoc/blob/master/
  4. XcodeIntegrationScript.markdown

Xcode经常使用插件使用及自己主动生成帮助文档的更多相关文章

  1. Android studio 插件之 GsonFormat (自己主动生成javabean)

    概述 相信大家在做开发的过程中都写过非常多的javabean ,非常多情况下 都是一个列表数据就是一个单独的javabean.假设大家自己敲的话费时费力 还非常easy敲错. 今天给大家推荐一个插件 ...

  2. MySQL中文全文索引插件 mysqlcft 1.0.0 安装使用文档[原创]

    [文章+程序 作者:张宴 本文版本:v1.0 最后修改:2008.07.01 转载请注明原文链接:http://blog.zyan.cc/post/356/] MySQL在高并发连接.数据库记录数较多 ...

  3. 使用Xcode HeaderDoc和Doxygen文档化你的Objective-C和Swift代码

    在一个应用的整个开发过程中涉及到了无数的步骤.其中一些是应用的说明,图片的创作,应用的实现,和实现过后的测试阶段.写代码可能组成了这个过程的绝大部分,因为正是它给了应用生命,但是这样还不够,与它同等重 ...

  4. php学习之道:php中soap的使用实例以及生成WSDL文件,提供自己主动生成WSDL文件的类库——SoapDiscovery.class.php类

    1. web service普及: Webservice soap wsdl差别之个人见解 Web Service实现业务诉求:  Web Service是真正"办事"的那个,提供 ...

  5. NPOI插件生成导出word文档

    因为之前没有接触NPOI过这个插件,所以几乎都是自己一边百度摸索一边学习. 这个插件对于Excel的数据导入和导出,可以说是很方便了, 但是对于导出word文档,可以说是很少的,百度了很多....也不 ...

  6. 每次Xcode 升级之后 插件失效,两步解决

    以下内容来源:http://www.cocoachina.com/bbs/read.php?tid=296269 每次Xcode 升级之后 插件失效,两步解决 1.打开终端,输入以下代码获取到DVTP ...

  7. Xcode --自动注释插件VVDocumenter-Xcode(配置须知)

    VVDocumenter-Xcode 是由 @onevcat 喵神开发的一个Xcode插件,其作用是在Xcode中输入"///"后自动生成规范的文档注释,的确非常好用而且实用. 百 ...

  8. Xcode升级后插件失效的原理与修复办法

    转载:http://joeshang.github.io/2015/04/10/fix-xcode-upgrade-plugin-invalid/ Xcode 的插件大大丰富了 Xcode 的功能,而 ...

  9. xcode 必用插件二

    本文大致整理了自己用过的一些插件的使用感想(就是好不好用). 在那之前先简单贴两条插件须知,知道的可以忽略. 1.Alcatraz 类似于管理第三方库的cocoapods,管理插件也有个Alcatra ...

随机推荐

  1. 18/9/16牛客网提高组Day2

    牛客网提高组Day2 T1 方差 第一眼看就知道要打暴力啊,然而并没有想到去化简式子... 可能因为昨晚没睡好,今天上午困死 导致暴力打了一个半小时,还不对... #include <algor ...

  2. Redis .Net客户端源码

    1.简单介绍 当前NoSql使用已经极为普遍,无论是Java生态圈,还是.net生态圈.大大小小的Web站点在追求高性能高可靠性方面,不由自主都选择了NoSQL技术作为优先考虑的方面.主流的技术有:H ...

  3. tomcat做成windows服务之后使用JMX监控的问题

    转载:http://blog.chinaunix.net/uid-20449851-id-2369842.html

  4. Android Studio中怎样引用图片资源

    随着不断接触Android Studio,越来越发现和Eclipse有着巨大的差别. 不管是表面的目录结构,还是内在对各种资源的管理. 本篇就来聊聊Android Studio中怎样来显示图片. 以及 ...

  5. 二、MongoDB基础知识

    1.文档是MongoDB的核心概念.文档就是键值对的一个有序集{'msg':'hello','foo':3}.类似于python中的有序字典. 需要注意的是: #1.文档中的键/值对是有序的. #2. ...

  6. 基于EmguCV的摄像机标定及矫正

    标签: EmguCV摄像头标定C# 2015-05-03 14:55 501人阅读 评论(6) 收藏 举报  分类: C# 版权声明:本文为博主原创文章,未经博主允许不得转载.   目录(?)[+] ...

  7. ECMALL功能拓扑图以及模式分析

    ECMALL  VS  常规的B2C产品(以ECSHOP做对比)的区别: 1.支持多用户在同一个域名下开店. 2.开店的卖家各自结算,直接收钱.平台只是提供了一个类似传统行业的摊位.平台不过手金钱 3 ...

  8. JS学习笔记 - 面向对象 - 选项卡 (普通选项卡改写)

    选项卡3 <script> window.onload=function () { new TabSwitch('div1'); }; function TabSwitch(id) // ...

  9. DE1-SOC调试linux应用程序

    参考http://www.alterawiki.com/wiki/SoCEDSGettingStarted#Getting_Started_with_Linux_Application_Debuggi ...

  10. smack capable(CAP_MAC_OVERRIDE)

    https://blog.csdn.net/ning_wei/article/details/9670947 LINUX中的capable int smk_curacc(char *obj_label ...