App starts and the device screen goes black sometimes - ios

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 :)

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.

Xcode9 made my Iphone7 screen go black

I launched an app with my own iphone7. the app had nothing on it. It is a single page application in IOS. when I ran the app it made my phone's screen go black. I can still get messages and it makes sounds, but the screen is black so I can not use it. How can I fix it?
I assume you're still running the app itself, and because your app has no content, it shows a black screen by default. If that's the case, you can forcibly terminate the app by double-tapping on the Home button, and then swiping down on the problematic app.
As an alternative, you could try soft resetting the device itself, by holding the Sleep button and the Home button at the same time for 10 seconds.
As a last resort, you can hard reset the device under Settings -> General -> Reset -> Erase All Content And Settings. Note that this will erase everything on the device, so should only be attempted if nothing else works.

Xcode Simulator showing black screen after app launces

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.

Black screen showing instead of LaunchScreen.xib

I'm trying to make my file LaunchScreen.xib show as the launch screen of my app. Whenever I run the app for the first time (where you run the app, and the simulator loads up for the first time), the splash screen is not shown.
There's one black screen before the simulator loads, but then there is a second black screen before my app loads. If I run the app again, after the simulator is loaded, the launch screen displays with no issue. However, if the black screen shows the first time, users will assume the app is not working, hence why this is a concern.
These are the settings I am using for my launch screen.
All help appreciated.
It is just Xcode's fault. While starting the app Xcode attaches its debugger and does some communication and a lot of other stuff. It is very possible that the launch screen is not displayed during that time or just for a split second.
If you just have the app on the device, completely quit it and then start it again, the launch screen should show up as expected.
There is no issue. The simulator load with blackscreen, it's not belong to your application. (os loaded at that time). After simulator loaded os, it launches your app with your laucnh screen

How to disable autoscreenshot of window when app switching in iOS 6?

How to disable autoscreenshot of window when app switching in iOS 6 ?
I am launching app in iOS 5, and switching to other app with 5 fingers (slide gesture). Then back to first app, and while app is scrolling, i see a Default.png image. This is good.
But in iOS 6, while app is coming, i see a screenshot of app window, it seems, which was made when app is go to background. This is bad, because screenshot was made in old time and showing to user wrong image, and after app is activating, image is changing at quickly to true. In some case, screenshot is actually, but after 2-3 tryes, screenshot is very old.
Anybody knows, how to disable autoscreenshot OR maybe resolve problem with screenshot, for screenshot will be do at every time, when app is switching?
Thanks

Resources