import UIKit
import CoreData

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
  var window: UIWindow?
  
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        return true
    }

    func applicationWillResignActive(_ application: UIApplication) {
        return true
    }

    func applicationDidEnterBackground(_ application: UIApplication) {
      return true
    }

    func applicationWillEnterForeground(_ application: UIApplication) {
      return true
    }

    func applicationDidBecomeActive(_ application: UIApplication) {
      return true
    }
  
    func applicationWillTerminate(_ application: UIApplication) {
        self.saveContext()
        return true
    }
}
