tags:

views:

49

answers:

1

Hi there,

When i start my app for the first time after installing it and exit before the splash screen disappears, from then on launching from the multitasking menu it comes up with a black screen. If I click on it from the home screen it loads fine but every time I try from the multitasking menu it is a black screen until I terminate it. If I add the UIApplcationExitOnSuspend property to the properties list the black screen continually appears until i restart the device. Any help is appreciated.

Thanks Sj

A: 

A couple things:

  1. You probably don't want to suspend your app prior to the splash screen disappearing. applicationDidFinishLaunching is running code (you know, like adding a window to the app) while the splash screen is showing. If you suspend it early, it doesn't have a chance. This may not be the case after the first time install but if I were you, I'd give it the time it needs to do initial install instead of interrupting it.
  2. Another less likely scenario: Are you doing this while the debug is still running? I've only had an issue similar to this (black screen after suspend) if I leave debug running and then suspend the app to the background. As soon as you bring it back out of the background, you get a black screen, so in that case it's a bug. If you hit the stop sign button in XCode to kill the app, it worked fine after that.. but you have to kill it before suspending it.

My guess is your likely cause is #1. Give the app more time to do the initial load. After that, it should be fine. For whatever reason, the first time installing/loading is always the slowest.

iWasRobbed
Right, i can't stop the user pressing the home key while the splash screen is visible so is there a way of making the application wait before it terminates? Thanks Sj
Sjblack
Ahh, I was assuming you meant during your initial install from XCode onto the device. If you are having an issue in general use of a black screen when suspending during the splash screen, you may have a different problem. I saw your other post about this as well, could you please update that one with the code I suggested? (`applicationDidFinishLaunching` and `viewDidLoad`).. Unfortunately you cannot stop an application from suspending or terminating (you can kill it instead of suspending it though).
iWasRobbed