title: NSPersistentStoreCoordinator addPersistentStoreWithType… causes exception
body: <p>I'm trying to use Core Data on a project with code adapted from iOS Programming: The Big Nerd Ranch Guide (3rd ed). Opening the SQLite file is causing an exception, and no amount of documentation reading or search engine digging is helping me figure out what it means or how to avoid it.</p>
  
  <p>The code in question is in the init method of a data store class, and reads as follows:</p>
  
  <pre><code>- (id)init
  {
      self = [super init];
      if (self) {
          // snip
          NSURL *storeURL = [NSURL fileURLWithPath:[self itemArchivePath]];
          NSPersistentStoreCoordinator *psc = [[NSPersistentStoreCoordinator alloc] init];
          NSError *error = nil;
          if (![psc addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&amp;error]) {
              [NSException raise:@"Couldn't open the SQL file" format:@"Reason: %@", [error localizedDescription]];
          }
          // snip
      }
      return self;
  }
  </code></pre>
  
  <p>The exception is happening on the addPersistentStoreWithType: line, so we're not making it to the exception in the if block. Here's what I'm being told:</p>
  
  <pre><code>2013-07-01 14:46:04.647 (app name)[5859:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: NSStoreModelVersionHashes)'
  </code></pre>
  
  <p>When I set a breakpoint on the faulty line, Xcode doesn't let me go inside the function call, so I'm not sure where NSStoreModelVersionHashes is coming from or how to avoid it being set to nil. I can <code>po storeURL</code> and it seems to be the proper URL. Resetting the iOS Simulator, using a different name for the SQL file, or other solutions I've found for issues which seem to be tangentally related hasn't seemed to help anything.</p>