Black screen before splash screen shows on standalone app?

Does anyone have any idea as to why this may occur? I’m assuming it’s something to do with the image having to load.

    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#1267F4"

Hi @selly - could you perhaps post a gif that shows this problem?

I’m unable to post a gif of it, but basically if the app is completely closed, when clicking on it to open, the entire screen goes black with the status bar text being white and then about 200ms later, the correct splash image shows.

@selly could you provide a way for us to repro this problem? A snack would do, even though we’d need to build it as a standalone app.

Unfortunately, I’m unable to share the project’s source code, but the mystery digs further. If I xcrun simctl install booted the standalone app to run it on the simulator, the splash screen works exactly as expected. It’s only showing the black screen on the testflight-released app.

I’ve seen scattered reports of this once or twice in the past, but have never been able to reproduce it myself. If I recall correctly, someone else theorized that it was an issue related to caching on iOS. What happens if you perform a clean installation (remove the old version first)?

I tried that and the issue still persists. Also tried installing previous versions where we are sure the issue wasn’t occurring. I have one theory that it may be because we updated the splash screen and the new image had the same file name (maybe a way of reproducing?).

I’ll try a build with the splash image renamed and see if that would make any change as I can only assume it would clear the cache.

Hmm, all Expo binaries use the same filename for this file in the generated archive. For the most part this seems to be working fine for people, since we don’t have widespread reports of this issue.

You can look inside the .ipa or .app we generate for you and inspect the file called launch_background_image.png sitting in there.

Interesting, it’s almost certainly to do with the cache. Although I don’t know how to reproduce it, I have found a way of fixing this issue.

  1. Delete the app.
  2. Power down the device completely
  3. Boot the device back up
  4. Install the app again

Deleting the app and re-installing doesn’t appear to clear the cache, a full reboot is required.

The only thing close to providing steps to reproduce it would be that we changed the splash image and color and then began having the issue.

:thinking:that’s pretty odd. We may need to provide some randomness in the generated launch asset to bust the iOS system cache when you regenerate your binary. I’ve opened an issue to keep track of this:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.