KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
any ideas why am I getting an "unknown type name NSManagedObjectContext" in this code? I'm basically adding core data to an existing project. I've added the coredata lines + I have added in the CoreData.framework to the project. To do this I went: when to application target build phases link binary with library then added the CoreData framwork then dragged it down on the project navigator so it appeared with the other framework icons in Xcode Note sure what else I have to do? The CoreDataBooks example code that looks pretty much the same as what I have seems to compile #import <UIKit/UIKit.h> @interface myAppAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; UINavigationController *navigationController; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; // Core Data @property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext; // ERROR: unknown type @property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel; // ERROR: unknown type @property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator; // ERROR: unknown type - (void)saveContext; - (NSURL *)applicationDocumentsDirectory; @end
Tags (comma-separated)
Save Edits
Cancel