No #import<UIKit/UIKit.h> in Obj-C template


#1

When I create the Possession class with CocaTouch Objective-C class template, the line #import <UIKit/UIKit.h> is not there, instead I have #import <Foundation/Foundation.h>.

I am using XCode 4.2.1

Also, when I type in #import <UIKit/UIKit.h> I get the error, “UIKit/UIKit.h” file not found.

I looked up this error and I found some answers that said UIKit is not included in MacOSX, but it is specific to iPhone: forums.macrumors.com/showthread.php?t=1194897

Is UIKit supposed to be in this file? If so, any thoughts on where I went wrong?

Thanks!


#2

It sounds like you chose the application template from the MAC OS X column instead of the iOS column. I’ve done this before. Without knowing exactly what you did it is hard to tell. If the only choice to run the app on is My MAC instead of iOS simulator or iOS device, then you chose the template from the MAC OS X column.

Fred


#3

Just to follow up with this - I got this to work by taking out the #Import<UIKit/UIKit.h> line; since this is a Mac OSX Terminal Application, so it seems like it wouldn’t make sense to have the iOS UIKit stuff in there. Could be wrong, but I got the assignment to work fine in any case.