views:

44

answers:

1

I am trying to migrate my sandpit code into my main project but for some reason I am getting the following strange error when trying to compile

syntax error before 'NSManagedObjectModel'

At first I thought this was because coredata wasnt in the prefix.pch file but I have added it in there too.

This is the top of AppDelegate where the code is being used (straight out of an Apple example)

#import <UIKit/UIKit.h>
#import "AppSettings.h"
#import "Skin.h"

@interface JeanieAppDelegate : NSObject <UIApplicationDelegate> {

    NSManagedObjectModel *managedObjectModel;
    NSManagedObjectContext *managedObjectContext;       
    NSPersistentStoreCoordinator *persistentStoreCoordinator;
+2  A: 

#import <CoreData/CoreData.h> and don't forget to link it in.

Dave DeLong
thanks coding at 2.30am has its downsides! Especially when the wireless keyboard AND mouse batteries die!
tigermain