You can have the cocos2d API reference integrated into XCode by following these steps:
Install doxygen
- Download and install the latest doxygen package from:
- http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc
- (Download the .DMG package)
Select the cocos2d-documentation target
- Open the cocos2d-iphone xcode project
- Select the “cocos2d-documentation” target
- XCode -> Project -> Set Active Target -> cocos2d-documentation
Build the target
- Build the target like any other target
- XCode -> Build -> Build
Open the XCode Documentation
- Open The XCode documentation browser
- XCode -> Help -> Documentation
Use the cocos2d API reference
- Select the cocos2d-documentation component from the available DOC SETS
- Search for your favorite word. eg: AtlasSprite







Hey this is pretty confusing. I installed doxygen but I’m not sure how to open the cocos2d-iphone project. Where is that located?
Thanks
@Jabari: http://www.cocos2d-iphone.org/archives/353
Awesome! Thanks guys!
I have some trouble while building. it tells
line 36: /Applications/Doxygen.app/Contents/Resources/doxygen: No such file or directory
does that mean i didn’t install doxygen complity?
This is great Riq as it makes a big difference!
One note is that I had to restart XCode for this to show up in the documentation.
This is really handy! Thanks Riq!
Thanks – this is very useful. I also had to restart XCode to get this to show up in documentation. Perhaps that should be added as the final step.
Thanks! But note that it won’t build if your path has spaces in it
I had to rename my HD from the default “Macintosh HD” to “MacintoshHD” for this to build.
Also, I can’t compile it when have a space in the folder name.
This is what worked for me
1. Copy Doxygen to /Application
2. Run Doxygen
3. Restart Xcode (open if it was closed)
4. Build cocos2d-documentation
I had an error about an unexpected character ‘
For other users, plz note that the documentation still works, you just need to restart xcode
Can the chipmunk API be integrated into Xcode like cocos2d’s?
Yeah i get the same error, unexpected character ‘
About build error:unexpected character ‘”‘
at ParticleSystem.h line:241
change
/** whether or not the particles are using “blend additive */
to
/** whether or not the particles are using blend additive */
then build success.
blueseaineye, thanx for your reply.
I got it.
my installation says “theres no SDK with the name or path “iphoneismulator2.2″. why it does try use old iphone SDK?
nvm i had wrong SDK chosen :/
I’m new to cocos2d and I wonder if I can integrate it to Xcode 3.2, use it for Iphone SDK 3.0, MacOS 10.6. Any future developments for this specific versions?
Thanks.
Is there a different process for Xcode 3.2? It doesn’t seem to be building correctly. I get an error “Osascript: /Users/[myuser]/Documents/iPhone: No such file or directory.” Any hints?
@eshirt: is there any space on the path ? That might be the problem (fixed on cocos2d v0.8.2-beta)
@riq – no spaces in the path… I can’t seem to figure it out. I just installed the 0.8.2 docs and it worked like a charm. I’ll just make sure to keep in mind the changes for my 0.8.1 app. Thanks!
Worked like a charm!
Having the Chipmunk and/or Box2d API integrated as well would be super! Never used this Doxygen though… Anyone?
hey friends ..!
thank you so much for the intructions step by step…!
and yes.. please
“Do Not Forget To Restart The Xcode”
keep helping…!!
thanks.
Is it possible to have this show up in the Class Browser?
Anyone running Snow Leopard and Adobe software may encounter the following error when executing osascript commands (used by the Documentation installer)…
2009-12-25 11:25:34.009 osascript[18683:903] Cannot find executable for CFBundle 0×100124950 (not loaded)
osascript: OpenScripting.framework – scripting addition “/Library/ScriptingAdditions/Adobe Unit Types.osax” declares no loadable handlers.
This can be fixed by following the steps below at the Adobe site to upgrade to the 64bit version of the extension…
http://kb2.adobe.com/cps/516/cpsid_51615.html
Barney
i installed doxygen in /Applications. Then i pressed “run”.
I have some trouble while building. it tells
line 41: /Applications/Doxygen.app/Contents/Resources/doxygen: No such file or directory
? Why?
Audijacker, I made sure I ran doxygen once first so that I could click the “You downloaded this file from the internet” button to allow it. That might be the issue.
I also had to make a folder path that it wanted, down in the build path, manually. But got it working eventually.
hey
i did everything said but i have the problem that if i alt+double click it says
Documentation not found for the symbol ‘CCLayer’.
but if i select rightclick + find text in docs it shows the wanted files. do i need to index the documentation somehow?
I have installed the documentation for the cocos2d. It works fine but underneath the classes tab don’t get any of the classes name
I follow all the steps but cant get the cocos2d doc set appears on the help windows. Any ideas?
I have the same problem. Few months ago I installed cocos2d 0.8.1 and built its documentation and everything went fine. I could see the 0.8.1 docs in XCode. Today I installed 0.99.2 and built the documentation (no errors), but I only see the 0.8.1 docset… is there a solution to this?
Thanks a lot help is now available,
But how can i map option:double click to show the documentation of a cocos 2d object.
I can make no sense whatsoever of this?
First I run Doxygen which presents me with a GUI Frontend that I have no idea what I am supposed to do with?
Then I what am I supposed to do from there? IN XCode I see no documentation project or where to get it from?
I know some of you are getting it installed, but for me these instructions are very vague.
Help???
DOH!!!
Always..always the way! Once you post a question like this it all falls into place and hey presto it works.
Finally figured it out, instructions though are to vague….but im happy now anyway
thanks
Could this tutorial be more specific? What should I do with Doxygen? I’ve build the documentation and it got 1 warning. When I open the Xcode documentation, I found no cocos2d documentation in it.
Thanks, well done for this tips!
I just downloaded and install doxygen, from the package I copied doxygen to the applications folder. Then I followed the way in this post described. After I found build succeed I restarted XCode, and then I searched CCSprite and I found its appeared in the documentation.
While this is great, I still prefer having a seperate app window open with the docs.
shameless plug
you can restart the xcode,and it will be ok