iPhone returns to black screen after sleep interrupt during splash screen

629 Views Asked by At

I've got a strange bug going on that seems to be OS related : If I give a sleep interrupt to my device while the OS controlled splash screen, Default.png, is displayed, and then immediately wake the device, I get a black screen until applicationDidFinishLaunching: is called and the OS passes control to my app.

It would be nice if upon waking the device, Default.png still displayed properly. I put some logs in to see when the interrupt handlers (applicationWillResignActive: etc.) get called, but they never do - I think the interrupt is happening too soon.

Any ideas on how to avoid returning to a black screen?

Thanks in advance!

1

There are 1 best solutions below

4
On

You don't have any control over the splash screen how long it will display. The Default.png file will show while the app is being set up, but will disappear as soon as the app is ready to launch.

If you need more time to finish loading, you should create another view that looks like the splash screen that you have control over.

Just know that Apple is prickly when it comes to how the splash screen is used. They are of the opinion that your app shouldn't have one anyway. So be careful how long you sit on an empty/splash screen. Display a progress view or activity indicator to let the user know that you haven't crashed and are still working.