appledoc can be integrated with Xcode in many ways. Below is one of those to get you up and running quickly on Xcode 4.6
- Select top of your project in Project Navigator
- Click Add Target
- Depending on your project type (IOS or OS X) choose Aggregate Template
- Create new target. I suggest to call it Documentation
- Click on Build Phases and add new Build Phase based on Script
- Paste the script below into the script window
- Adjust variables in section "Start Constants" as required
- Uncomment correct 'target' for your project and comment out another one depending on your project type.
- Adjust path to appledoc binary and appledoc's command-line switches if required
- When you ready to generate a docset from your project, build Documentation target.
- Docset will be installed into new loction and will become available to Xcode immediately.
- To refresh Quick Help (ALT+Click) and (ALT+double-click) you may need to restart Xcode to refresh its index cache.
#appledoc Xcode script
company="ACME"; companyID="com.ACME"; companyURL="http://ACME.com"; target="iphoneos"; #target="macosx"; outputPath="~/help";
/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}"