thread 1: Fatal error: Unexpectedly found nil

Hello guys!


While doing the XCODE projects in my class, my fellow colleague and I have ran into these problems.

It happens when we try to run our project in the simulator.

We are the only ones in our class who are running into this problem and can't seem to see why we are the only ones having this error.

"thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value". We looked over fourms on how to solve the issue. We looked for answers and were to told to unwrap our optionals and that we had stated our values NIL.

on the line

"class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?"


We are only starting programmers and use IBooks. We are currently working on the Apple Pie Project. My colleague thinks its an error between the outlet, and a file within xcode.


We are running XCODE version 9.2 on MacBook Air (13-inch, Early 2015) - MacOS Sierra version 10.12.6.

Replies

Check the connections.


Then do a clean Build Folder (option clean in Product menu).

`Unexpectedly found nil` may happen in various parts of your program and you first need to find where is the line causing the error.

(Generally, if the first line of the AppDelegate is pointed, it is not the the actual line of the error.)


Can you copy the stack trace info shown in the left side pane?