Integrating cocos2d API reference into XCode

You can have the cocos2d API reference integrated into XCode by following these steps:

Install doxygen

Select the cocos2d-documentation target

  • Open the cocos2d-iphone xcode project
  • Select the “cocos2d-documentation” target
    • XCode -> Project -> Set Active Target -> cocos2d-documentation

doc-target

Build the target

  • Build the target like any other target
    • XCode -> Build -> Build

doc-build

Open the XCode Documentation

  • Open The XCode documentation browser
    • XCode -> Help -> Documentation

doc-help

Use the cocos2d API reference

  • Select the cocos2d-documentation component from the available DOC SETS
  • Search for your favorite word. eg: AtlasSprite

doc-search

28 Responses to “Integrating cocos2d API reference into XCode”


  • 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

  • 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?

Leave a Reply