title: why am I getting an "unknown type name NSManagedObjectContext" in this code?
body: <p>any ideas why am I getting an "unknown type name NSManagedObjectContext" in this code?</p>
  
  <p>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:</p>
  
  <ul>
  <li>when to application target</li>
  <li>build phases </li>
  <li>link binary with library</li>
  <li>then added the CoreData framwork</li>
  <li>then dragged it down on the project navigator so it appeared with the other framework icons in Xcode</li>
  </ul>
  
  <p>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</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface myAppAppDelegate : NSObject &lt;UIApplicationDelegate&gt; {
      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
  </code></pre>