title: Adding new version to CoreData
body: <p>I have a coredata model with 2 entities, one entity has a relationship with the other,(DataSet---(To many)-->DataPoints). Originally I had this relationship to have an inverse but I ended up not needing it. I knew that if I just changed it that people would have to reinstall the app, deleting all their data. So I looked up how to change it but still allow the old model to be compatible. </p>
  
  <p>I followed these steps I found on SO:</p>
  
  <ol>
  <li>Select the *.xcdatamodelId</li>
  <li>Select Editor > Add Model Version</li>
  <li>Provide a version name based on the previous model</li>
  <li>Make sure you select the new version you just created</li>
  <li>Give it a new identifier (in the file selector)</li>
  <li>Make your changes</li>
  <li>Select the *.xcdatamodelId and change the Model Version (in the file
  selector)</li>
  </ol>
  
  <p>I also selected the model and changed "Model Version" to "*v2"</p>
  
  <p>But when I run the app on a device with the old model, as soon as it trys to create data I get the error:</p>
  
  <blockquote>
    <p>Unresolved error Error Domain=YOUR_ERROR_DOMAIN Code=9999 "Failed to
    initialize the application's saved data"
    UserInfo={NSLocalizedDescription=Failed to initialize the
    application's saved data, NSUnderlyingError=0x1c06402d0 {Error
    Domain=NSCocoaErrorDomain Code=134100 "The managed object model
    version used to open the persistent store is incompatible with the one
    that was used to create the persistent store."</p>
  </blockquote>
  
  <p>I'm not sure if I missed something or I did something wrong. The only thing I changed was the relationship no longer has an inverse which isn't even used in the code. The way I understood it from my readings was if the most up to date model was not on the device it would look for a compatible model.</p>