title: XCode breaks managedObjectModel?
body: <p>Well, this is embarrassing. Until late last night development was smooth. I had recently upgraded XCode to 4.3.2 (iPhone was complaining). Enjoying implementing and testing a couple of new features;compiling every now and then. When I thought, well, for a final run let's delete the app from the device and walk through the whole process before submitting it to Apple.</p>
  
  <p>Then it happened. Suddenly the app compiles straight into a wall complaining about the managedObjectModel being nil. Since I have not changed any code in regards the core-data, I have come to the conclusion that I have not the slightest clue what the problem is. </p>
  
  <p>Is it possible that the upgrade to XCode broke the CoreData version migration ? What can I do about it ?</p>
  
  <pre><code>- (NSManagedObjectModel *)managedObjectModel
  {
      if (__managedObjectModel != nil)
      {
          return __managedObjectModel;
      }
  
  
  
  
      NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"userinfo" withExtension:@"momd"];
  
  
      NSLog(@"Model URL %@" , modelURL);
  
  
      __managedObjectModel =[[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]  ;
  
  
      NSLog(@"Model Entities %@" , [__managedObjectModel entities]);
  
  
      return __managedObjectModel;
  
  
  }
  </code></pre>
  
  <p>Here is the output for the above code: As we can see, no managedObjectModel is assigned.
  How can this be ? It was working perfectly just the day before. </p>
  
  <p>Model URL file://localhost/var/mobile/Applications/[ID Info]/[App Name].app/userinfo.momd/</p>
  
  <p>2012-04-06 07:39:50.375 [App Name][861:707] Model Entities (null)</p>