title: RestKit with Core Data: Use NSPersistentStore with RestKit RKObjectManager
body: <p>I am using RestKit with Core Data. Till now I initialized RestKit as following:</p>
  
  <pre><code>[...]
  RKObjectManager *objectManager = [RKObjectManager managerWithBaseURLString:@"http://URL"];
  objectManager.objectStore = [RKManagedObjectStore objectStoreWithStoreFilename:@"database.sql"];
  [...]
  </code></pre>
  
  <p>without this xcode auto-generated Core Data properties: </p>
  
  <pre><code>@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
  @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
  @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
  </code></pre>
  
  <p>Fetching data worked through calling objectsWithFetchRequest: in NSManagedObject. Now I would like to use NSFetchingResultsController and therefore I need at least such a managedObjectContext. But wherefrom do I get this managedObjectContext? My first idea was: from the auto-generated managedObjectContext in AppDelegate.m, but this 3 properties managedObjectContext, managedObjectModel and persistentStoreCoordinator are all depending on each other.</p>
  
  <p>How can I "link" RestKit to Core Data correctly? How can I "link" a persistentStoreCoordinator to RestKit and the RKObjectManager?</p>