title: Core Data - Migrating to new Model Name
body: <p>I have an app in the store now that I am updating. I did a lot of Core Data changes, including changing the name in both 'lazy var managedObjectModel: NSManagedObjectModel' and 'lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator?'.</p>
  
  <p>How can I properly use Core Data Migration to ensure when an existing user downloads the update, the app doesn't crash on them?</p>
  
  <p><strong>Old</strong>:</p>
  
  <pre><code>NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"MyApp-Model" withExtension:@"momd"];
  
  NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"MyApp.sqlite"];
  </code></pre>
  
  <p><strong>New</strong>: </p>
  
  <pre><code>let modelURL = NSBundle.mainBundle().URLForResource("My-App", withExtension: "momd")!
  
  let url = self.applicationDocumentsDirectory.URLByAppendingPathComponent("My-App.sqlite")
  </code></pre>