Xcode Simulator showing black screen after app launces - ios

Today, while working on an app, I went to run the simulator and instead of seeing the normal progression, I see only a blank grey screen. I never see the usual apple loading screen, the home screen, or my app launch. However, I know that the app is launching because print statements in my ViewDidLoad all print. Additionally, if I click in the area where buttons are, they run their functions.
I know that the problem is not a bug in the app, because I went back and ran old apps I have developed in the past and they also show only the grey screen.
I tried resetting content and settings on the simulator, but that did not help. I also played around with the scale of the simulator, but that didn't help either. I tried on the iPhone 5, 6, 6 plus, and others and they all have the same issue.
Anyone have any ideas?

If you have an external monitor, try unplugging it, restarting the simulator, and plugging the monitor back in. Worked for me.

Not sure what happened, but restarting my computer seems to have solved the issue.

Related

Expo Go works fine on iPhone8 Sim. but stuck at splash screen on other simulators or my real iPhone 11

I simply cannot figure out what’s going on here—My app works great in the simulator when it is set to iPhone 8, but if I change to 11, or try to open it in the expo app on my real iPhone, it hangs at the splash screen.
I am loading a few images and fonts with the splash screen, but it works perfectly well in the simulator when it’s set to iPhone 8, and I have no idea why it doesn’t just work equally well on any device size.
Does anyone have any ideas why the behavior would be different?
Edit: update on my findings. I have narrowed the issue down to a check for isClientReady which is a Boolean I create during the Splash Screen loading to check for an existing session and if so, connect to the Stream chat service’s client. When I remove this, then the Splash screen continues to load for the other device sizes, but then it sets up a race condition where the app loads before the user is connected to Stream and I get an error. I may be able to circumvent this by throwing up a spinner wheel once past the loading screen to await the Stream client check, but I wanted to avoid multiple loading states when the app starts and hide it behind the splash screen.
Weirdly, this is not and has never been a problem when using the iPhone 8 simulator, it works perfectly. It seems to be a problem with all other phone sizes, though, and my real iPhone 11.
So the question still remains—does anyone know why the behavior would vary between two different types of simulator? I’m stumped.

App working fine on simulator but shows multiple parse,semantic and arc errors on ipad

I am trying to run my app on ipad. I have already ran it on simulator and it works absolutely fine on on simulator with no error.But when I try to run it on ipad ,it shows multiple parse,arc and semantic errors and I am sure nothing is wrong in code as it used to work fine on devices too earlier but suddenly has started showing error.I have done the following things to resolve it but nothing worked:
1)quit xcode and start again
2)reboot ipad (clicking power button and home button together until apple icon appears)
3)cleaned(cmd+shif+k)
Is there any other way to fix it.Kindly give your suggestions.Thanks in advance.

How can I make sure that the iPhone simulator in Xcode will move past the the startup screen every time I use it?

When I run the iPhone simulator, sometimes it doesn't move past the opening screen, and sometimes it does.
What I am calling the opening screen is the screen which has the app tittle on it.
I have tried closing and re-opening it. But it doesn't seem to solve the problem, as it still comes back.
I am using the new Xcode beta but this problem also happens to me often in Xcode 6.
The simulator in my opinion is a little buggy to me. This seems to happen to me a lot the first time I run the simulator. After that it seems a little more stable.
This happens to me too sometimes. Simply stop and directly press the "Run" button again.
You can also try to change the Device or uninstall your app on the selected device.
Also try to close the Simulator and open it again and try to run your app after that
My answer is you cannot make sure about that, since it is just a simulator.
This happen to me to when i use xcode6 sometimes, but when i use xcode 5.1.1 it is working perfectly.
I think xcode6 do not stop the current running app before running the other instead it just override the current "same" running app. here is my theory as i observe it.
Assuming simulator is running.
in XCode 5.1.1:
Stops the currently running app > Compile > Run
but in XCode 6:
Compile > Override the same running app
But you dont want to worry about that so much, as long as it doesn't appear in actual device it is all good.

App starts and the device screen goes black sometimes

This is a very strange bug. I'm running my app on an iPhone device and only sometimes, when the app starts, you can see the app for a freckle of a second and then the screen goes black.
Any advice?
If you have call any thread or block the main thread to be execute, then for some second your screen will be blank. To avoid that add some splash screen shot, like FaceBook shows. Replace Default launch images. Default is blank, so it shows black screen. If you make required size screen shots then it will not shows black screen when app launch.
I do not know exactly why this happens but I develop an app and testing on several devices like 4, 4S,5,5S(iOS 7.1, 8.1) and get same black screen as you get after I change device. My solution is always "quit from simulator and open it again" when I do like this it works fine (Sometimes 3-4 times). I guess there is nothing to do by user. My thought, Only apple can solve this problem if we lucky :)

Hello World causes Iphone 5s to freeze

I recently began going through the official Apple documentation and tutorials to learn iPhone development. I got my Iphone 5s a couple of days ago, but the sample ToDo list app that I'm making causes the device to lock up randomly when I try to test on the device. For example, I if I make a chance to the code and build/run it on the device, it will work. However, as I keep updating the code and testing it, eventually it will just open up my app on the device as a complete black screen, and freezes. The home button then no longer works, no touch events work, the only think I can do is to hold Home+lock button until the device shuts down.
This cannot be normal, can it? I mean, its just a basic app, what could be causing it?
Attached is the error that shows in xcode, and also a screenshot of the Iphone when it its frozen. Surprisingly, I was able to use the screenshot functionality on the phone... :/
Please check whether you are using a distribution provisioning profile/certificate to sign the app. If you plan to debug the app on the device (use breakpoints etc.), you should sign it with a development provisioning profile.
It only happens sometimes, so it's not provisioning related.
It causes a message to popup in XCode itself, so it's not code related.
I had the same problems before (not that often really...). What I did was
Restart the device
Remove the app from the device
Clear the project builds (CMD SHIFT K)
Restart XCode.
Build & Run again
I actually haven't seen this for a while. I always thought that they fixed the bug. Hope this helps!

Resources