I am learning Swift from Online Course and while my instructor integrating CoreData to her existing code, She creates a new core data model and copy-paste App Delegate. But in her DataModel, there is not a SceneDelegate while there is in mine.
The problem is that I can not do the same things as her because of these differences. Therefore, I copied SceneDelegate.swift file into my Xcode project and copy other things from DataModel App Delegate.
After this solution, I got a black screen.
I do not know I should add her and my app delegate or not but differences are while I do not have applicationWillResignActive, applicationDidEnterBackgraound, etc. in the Core Data Model App Delegate, she does have.
How can I integrate CoreData into my project while there are these differences?
Thanks!
this is my app delegate file
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}
func applicationWillResignActive(_ application: UIApplication) {
}
func applicationDidEnterBackground(_ application: UIApplication) {
}
func applicationWillEnterForeground(_ application: UIApplication) {
}
func applicationDidBecomeActive(_ application: UIApplication) {
}
func applicationWillTerminate(_ application: UIApplication) {
}
}