title: App Delegate - Load Core Data Swift
body: <p>My app crashes every time using the abort function- core data. It crashes because of this code. What is wrong with it? </p>
  
  <pre><code>     import UIKit
       import CoreData
  
     class MyWordsTableViewController: UITableViewController, NSFetchedResultsControllerDelegate {
  
  
  var myList: Array&lt;AnyObject&gt; = []
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
  
      let appDel = UIApplication.sharedApplication().delegate as! AppDelegate
      let context = appDel.managedObjectContext
      let freq = NSFetchRequest(entityName: "List")
  
      do {
     try myList = context.executeFetchRequest(freq)
  
      } catch {
       print("error")
      }
  
      tableView.reloadData()
  </code></pre>