title: Error in the "persistentStoreCoordinator" using Swift 2.0
body: <p>I have implemented CoreData in my App using swift 1.2. After I migrated to swift 2.0, I started getting crash reports on iTune Connect. I tried one of my friend's devices that he has the App crashing after the update. I deleted the app and re-installed it from the App store and it worked perfectly after that, but i'm getting a lot of emails from users that are frustrated with the crash and it could be very inconvenient to ask users to uninstall the app and reinstall it.</p>
  
  <p>I couldn't reproduce the error on testing, so I used the organizer to run crash code, and the error code landed in this section:</p>
  
  <pre><code>lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator = {
      // The persistent store coordinator for the application. This implementation creates and returns a coordinator, having added the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail.
      // Create the coordinator and store
      let coordinator = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel)
      let url = self.applicationDocumentsDirectory.URLByAppendingPathComponent("SingleViewCoreData.sqlite")
      var failureReason = "There was an error creating or loading the application's saved data."
      do {
          try coordinator.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil)
  
      } catch {
  
          // Report any error we got.
          var dict = [String: AnyObject]()
          dict[NSLocalizedDescriptionKey] = "Failed to initialize the application's saved data"
          dict[NSLocalizedFailureReasonErrorKey] = failureReason
  
          dict[NSUnderlyingErrorKey] = error as NSError
          let wrappedError = NSError(domain: "YOUR_ERROR_DOMAIN", code: 9999, userInfo: dict)
          // Replace this with code to handle the error appropriately.
  </code></pre>
  
  <p>The error was highlighting the following line:</p>
  
  <pre><code>      // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.***
          NSLog("Unresolved error \(wrappedError), \(wrappedError.userInfo)")
          abort()
      }
  
      return coordinator
  }()
  </code></pre>
  
  <p>I never touched the app the core data generated files or the data models. </p>
  
  <p>I tried looking this up and I could never find a fix. It seems that it's a glitch that Apple didn't notice when they upgraded the Swift programming.
  The closest question that has a similar problem was <a href="https://stackoverflow.com/questions/30823072/swift-2-0-migration-errors">here</a>, and the solution "Tal Zion" suggested had the exact code in my AppDelegate. 
  I feel that after I migrated to Swift 2.0, somehow the sqlite file was changed or renamed and users who had data entered using the version built with Swift 1.2 had crashes with the swift 2.0 version. </p>
  
  <p>I would really appreciate if I could get a fix for this problem.</p>
  
  <p>Here is a screenshot of the error:</p>
  
  <p><a href="https://i.stack.imgur.com/IpBOJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IpBOJ.jpg" alt="enter image description here"></a></p>