Missing Objective-C start template in Xcode 3.2.6



As a late newcomer to iPhone development I am having trouble with the second part of Chapter 2.

You request I start a new Objective-C Class project, but my list of possible starting options in X-code differs from the screenshot in figure 2.7 and crucially the ‘Cocoa Class’ is missing from the options on the left-hand side. :cry:

My version of xcode is 3.2.6 downloaded from the apple developer site and installed (twice) with all options ticked. :confused:
Mac Book Pro with Snow Leopard 10.6.7

I don’t know if I’ll understand the text yet, but certainly won’t be able to follow along.


I don’t have a copy of Xcode 3.2.6 available to me right now, but, you are looking for an option somewhere that describes a NSObject subclass.

You can play with all of the options until you find that setting (I recommend this). Apple changes the names of these templates pretty much every month, because they’ve yet to figure out that the names don’t matter, and only serve to confuse newcomers. (I think that whoever is in charge of Xcode templates is pretty much just an evil guy seeing how angry he can make people.)

However, if you can’t find the right template, you can create the two files without a template.

To do this, you will need to create two empty files (which is one of the template choices) named Possession.h and Possession.m.

In Possession.h, enter this:

#import <Foundation/Foundation.h>

@interface Possession : NSObject


And in Possession.m:

#import "Possession.h"
@implementation Possession



Got it.

I didn’t realise I should be still working within the RandomPossessions project.

I was trying to create a new project instead of creating a class within another project.

Once I stayed without the original project the File -> New gave me the correct options and I’m on my way.