LoginSignup
0
0

More than 5 years have passed since last update.

Use appledoc tool to create project document.

Last updated at Posted at 2015-12-15

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.

  1. select "TARGETS",Then select "Editor"->"Add target".
  2. select Other -> "Aggregate".type the name.Next.
  3. in Build Phases blank.select"+" to add "New Run script phase".
  4. 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

like this

pic link

PS:

if we create document successfully.The effect will be:
pic link

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0