title: iPhone Core Data Example produces exception
body: <p>No longer under NDA. </p>
  
  <p>There was an ommision in the iPhone Core Data example, but is now corrected. Also the sample code was always correct, they just left out some details in the tutorial.</p>
  
  <p>(Please refer to <a href="https://devforums.apple.com/message/46441" rel="nofollow noreferrer">iPhone Dev Forums</a> for explanation)</p>
  
  <p>I built an app twice and received the same error twice (but in 2 different places):</p>
  
  <blockquote>
    <p>Terminating app due to uncaught
    exception
    'NSInternalInconsistencyException',
    reason: '+entityForName: could not
    locate an NSManagedObjectModel for
    entity name 'Event''</p>
  </blockquote>
  
  <p>I read the <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdTroubleshooting.html" rel="nofollow noreferrer">apple docs</a>:</p>
  
  <p>It speaks to a problem with the model missing, or the context is nil, or the persistence store is not valid.  </p>
  
  <p>However as this is my first Core Data project, I'm a little weak in debugging. I can post code if needed.</p>
  
  <p>Any help is much appreciated.</p>