XCode openFrameworks Templates

I have been using my own file templates for openFrameworks for a while now, but since I found out about this in China and was messing around with it on a train between Shanghai and Hangzhou I totally forgot about it. Recently people in class have been asking about creating classes in OF, so I’m taking this as an opportunity to fix some things I have been meaning to correct in my file templates and put them up for people to share/use.

These templates are file templates, if you’re looking for Project Templates Memo Akten has a great post on how to install his XCode project templates for both desktop and iphone. You can check that out here:

Memo’s iPhone Templates

To install these templates, you first need to create the following folder:
(Your Hard Disk)>>Library>>Application Support>>Developer>>Shared>>XCode>>File Templates

NOTE: This folder probably doesn’t exist yet, but this is the main place XCode will look for your templates. This is different than the Apple templates, which are in the following directory:

(Your Hard Disk)>>Developer>>Library>>XCode>>File Templates

This is a great place to look at the built in templates (this is how I figured out how to create these templates), but you shouldn’t modify these or depend on them because I believe they get changed when you update XCode.

The next step is to download the zip I’m including below and copy the files into your File templates folder (specified above).

Now if you go into XCode, open a project, right click on the SRC folder and select “Add>New File…” you’ll be presented with a dialog. You should see the category “User Templates” on the left, and under that “openFrameworks”. Click on “openFrameworks” and select “basicClass”. Hit “next”, name your class, and click “finish”.

You now should have a new OF/C++ class ready to go with the basic setup(), update() and draw() functions, header includes, definitions, etc.

Enjoy!

Files for Download:
openFrameworks File Templates



This entry was posted on Wednesday, September 30th, 2009 at 9:14 am and is filed under Classes, openFrameworks, setPixel. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses to “XCode openFrameworks Templates”

  1. Webmaster Crap » Blog Archive » Blogatron » XCode openFrameworks Templates

    [...] Originally posted here: Blogatron » XCode openFrameworks Templates [...]

  2. Webmaster Crap » Blog Archive » Blogatron » XCode openFrameworks Templates

    [...] View post: Blogatron » XCode openFrameworks Templates [...]

Leave a Reply

Your comment