appledoc on github:
https://github.com/tomaz/appledoc
1.appledoc install(use terminal to install):
first:
type sentence blow:
git clone git://github.com/tomaz/appledoc.git
cd ./appledoc
sudo sh install-appledoc.sh
to confirm whether is appledoc installed:
appledoc --version
if install successfully,go on.
second:to set your Xcode project.
- select "TARGETS",Then select "Editor"->"Add target".
- select Other -> "Aggregate".type the name.Next.
- in Build Phases blank.select"+" to add "New Run script phase".
- type sentence blow in the blank:
#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}"
5.select the target that you created it just now, then bulid your project with "command + R".
6. reopen your Xcode.
third:
use terminal to enter the code directory that you want to create document.Then, type sentence:
appledoc --output ./doc --project-name objcdoc --project-company "kxx.xxq" --company-id "com.kxxxxq" ./
ps. "./doc" is the directory to save document explain."objcdoc" is your project name."kxx.xxq" is your company name. "com.kxxxxq" is your company id."./" means to save your document at default directory(example: /Users/asahi/Library/Developer/Shared/Documentation/DocSets).
forth:Learn the methods that write annotations in Xcode file.
A good article to learn write annotations in Xcode file