Wednesday, May 4, 2011

Empty OpenGL ES Application Xcode 4 Template

Jacques De Schepper sent in an updated version of my old Empty OpenGL ES Application Template, updated to use Xcode 4's completely revamped templating mechanism. You can download the new Xcode 4 version of the template right here. I haven't had a chance yet to test this out, but once I do, I'll also add it to GitHub. Thanks, Jacques!



12 comments:

Miles said...

I was just struggling with this the other day, awesome!

GuidoQ said...

It compiles but doesn't create any display.

Niels said...

When I extract the new template xcode doesn't recognize it. Do I extract it over/on top of the old one? It doesn't seem to have a directory structure like other templates.

Alexi Johansen said...

I'd love to get going with your tutorials but I can't get your template to work. The original complains it can't find the Sdk and the new one doesn't show up as a template. I've tried to mix the 2 but no luck. Could you check to see if it's okay?

Jacko said...

@Niels, Alexi: The location of templates for XCode 4 has changed. You should extract the template to:

%USER_DIR%/Library/Developer/Xcode/Templates/Project Templates/

This will add a new 'Project Templates' category containing the Empty OpenGL ES template.

@GuidoQ: The default project doesn't contain any drawing code, so it is normal that it doesn't display anything. Adding in some code from Jeff's tutorials should give the correct result. I have only tried it with the simulator though, not yet with an actual device.

Niels said...
This comment has been removed by the author.
Niels said...

@jacko is that correct? In my Library directory there is no "developer" directory and when I make the path Xcode does not recognize the new files.

Niels said...

So there is a folder in "user/Application Support/" that is called: 'Developer'. It has the correct sub-directories but extracting the zip there does not give me a new template in Xcode.

Any ideas, I would really like to get started with these tutorials.

Niels said...

Grrr. It doesn't show up under IOS applications or anywhere else.

Jacko said...

XCode 4 uses two directories for fetching your templates:

/Developer/Library/Xcode/Templates/
is the one installed by Xcode, this one gets overwritten with updates of XCode

/Users/%username%/Library/Developer/Xcode/Templates/
is the one that won't be overwritten by Xcode. In my case, the Xcode directory already existed, though I had to create the Templates folder myself.

My listing currently looks like this:
/Users/%username%/Library/Developer/Xcode/Templates/Project Templates/Empty OpenGL ES Application.xctemplate/...

If this doesn't work, you can try adding the xctemplate folder under the /Developer/Library/Xcode/Templates/ hierarchy, see if that works...

arno said...

Sorry Jacko but still not working !!

I even try to add the .xctemplate to the name of the zip (unzipped of curse) because it was missing.

My listing currently looks like this:
/Users/%username%/Library/Developer/Xcode/Templates/Project Templates/Empty OpenGL ES Application.xctemplate/...

Anything else I sould change in Xcode to reconize it ?

Richard said...

For me using Xcode4.1, the correct path was /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/Application/Empty OpenGL ES Application.xctemplate/