Chapter 17 window is nil

Hi,

I finished chapter 17 and the app crashes because window is nil.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.
    let navigationController = window!.rootViewController as! UINavigationController
    let controller = navigationController.viewControllers[0] as! AllListsViewController
    controller.dataModel = dataModel
    return true
  }
1 Like

@djiangios Do you still have issues with this?

1 Like

This topic was automatically closed after 166 days. New replies are no longer allowed.