title: Core Data migration of attribute from String to Integer 16
body: <p>I'm having trouble migrating a store entity attribute from String to Integer 16. Here are the steps I take:</p>
  
  <ol>
  <li>Add Model Version...</li>
  <li>In the new model, change Entity attribute from String to Int 16.</li>
  <li>Select the new model in File Inspector > Versioned Core Data Model > Current Model</li>
  <li>Create a mapping model for the old and new models.</li>
  <li>Run</li>
  </ol>
  
  <p>Here is the error:</p>
  
  <blockquote>
    <p>Unresolved error Error Domain=NSCocoaErrorDomain Code=134140 "The
    operation couldn’t be completed. (Cocoa error 134140.)"
    UserInfo=0xbd5cd20 {reason=Can't find or automatically infer mapping
    model for migration, destinationModel=...</p>
  </blockquote>
  
  <p>The mapping model is there in the compiled .app: </p>
  
  <p><img src="https://i.stack.imgur.com/yHPNT.png" alt="Bundle"></p>
  
  <p>and in the Project:</p>
  
  <p><img src="https://i.stack.imgur.com/fEsvp.png" alt="enter image description here"></p>
  
  <p>Migration works for attributes like Integer 16 > Integer 32, or when changing attribute names.</p>
  
  <p>I tried creating a simple Core Data Project and migration worked automatically (with and without mapping model) from String to Integer 16 and back.</p>
  
  <p>The strangest part is I tried looking programatically for all mapping models in the bundle and none are found for the current source/destination models.</p>