title: How to create the magic .xcdatamodeld folder / package?
body: <p>Recently, I managed (by accident, don't ask) to delete my Core Data datamodel files and classes. And I was completely and utterly unable to create the files again to be exactly the same as they would be in a freshly started project where those files are being prepared automatically by XCode.</p>
  
  <p>In a new project, the files would look like this:</p>
  
  <p><img src="https://i.stack.imgur.com/aKRVn.jpg" alt="alt text"></p>
  
  <p>while all I was able to create was:</p>
  
  <p><img src="https://i.stack.imgur.com/Yk2AZ.jpg" alt="alt text"></p>
  
  <p>Did I mention that the app didn't work anymore this way? It crashed saying the model must not be <code>nil</code>. The problem was solved by starting a new project with the same name and dragging the files over to the old one - not the most elegant solution, I suppose.</p>
  
  <p>I figured however that there are things about Core Data that I still don't quite understand, obviously.</p>
  
  <p>Please, enlighten me - what's the magic behind the .xcdatamodeld folder? Why would Foo.xcdatamodel feature that green checked-icon? Does the datamodel need to be compiled or processed in some way?</p>
  
  <p>Thanks alot guys!!!</p>