Reputation: 129
I've created a simple program where a person can log in with a username and password. Every time I attempt to run it, I simply get a blank white screen. I tried changing the background color to a dark green one in hope that it would change it in the simulator too, however I get the same white screen.
This problem arose before I got that breakpoint error, it first started happening randomly in a previous project, which makes me think something is wrong with my xcode.
See my screenshot below:
Upvotes: 12
Views: 17640
Reputation: 1
It happened to me after exiting Xcode and closing the simulator the simulator device setting changed to the default ipod, when I realized this I changed it back to iPhone11. I got the white background but after waiting a few minutes it just worked.
Upvotes: 0
Reputation: 53
I don't know who this might help but I solved my problem by reinstalling CocoaPods and installing everything with pod install and pod update. I reset my mac some time back because it's storage was full and I forgot CocoaPods and all the pods uninstalled. Reinstalled them and now I'm back.
Edit: It didn't fix it but I am getting closer.
Upvotes: 0
Reputation: 439
I had this same issue where I saw the app briefly, and then it went to solid white. It pays to make sure you edit the "Main" storyboard, not the "LaunchScreen" storyboard when following tutorials... Maybe my embarrassing mistake will help someone else...
Upvotes: 10
Reputation: 4755
There are a few things to keep in mind here that could be causing thsi error.
Firstly, as some of the comments have pointed out the first thing you should do is delete the breakpoints from all the lines. To do that, you have 3 choices:
@IBAction func loginTapped()
Once this is out of the way, let's take the second most important step. Check that the loginViewController is the initial View Controller, so that it's the first page that's displayed. To do that, simply open the file inspector on the right-hand side. You can activate it by pressing the third button here:
Then, select your viewController,, so that it light up's blue like seen below:
Then, on the 3rd tab of The file inspector, by pressing the 4th tab that looks like an arrow pointing down. Now you should see a checkbox saying "isInitialViewController". Tick that so that you get through immediately to this screen. It should look like this down below:
Lastly, I'd like to point you to some more things you should check that could cause this error:
If all this fails, try restarting Xcode, the simulator and running again by pressing the Play Sign or CMD-R
.
Hope that helps, Julian
Upvotes: 2