[RESOLVED] Meteor 1.3-rc.12 - Splash screen do not follow : AutoHideSplashScreen=false

hello all,

I have put together a quick repo to reproduce the issue : https://github.com/anymos/cordova-meteor-splash

Using Cordova only with almost the same code and the same config.xml ( at least for the splash screen ), the show() and hide() method works as expected

Using meteor 1.3, the splash screen did not stay up and hide as soon as the js is started.

I have tested only in ios as it’s a blocking point for my customers ( they hate the white screen flash !, I have proposed to change it to black but … no luck :wink: )

@martijnwalraven , Hello Martin, If you re not too much busy, could you kindly have look to this ? kindly tell me if I could help more on my side to help to find this bug.

By default, Meteor adds the launch-screen package to your app, which takes control of hiding the splash screen. It allows you to hold() the launch screen from multiple places and automatically hides it when all handles have been released. So to add an additional hold you would do something like this:

var handle = LaunchScreen.hold();

Meteor.startup(function() {
  var count = 30;
  var timer = setInterval(function() {
      count--;
      console.log('count:', count);
      if (count == 0){
          handle.release();
          clearInterval(timer);
      }
  }, 1000);
});

(Note that Meteor.startup() automatically waits for deviceready on Cordova.)

In the course of investigating this however, it turned out there is a long-standing bug in launch-screen that means the wait cannot be extended beyond 6s: https://github.com/meteor/meteor/commit/335836931875f367da5c12d9e08132f4a773e35e

Alternatively, if you want to avoid using launch-screen and take control over the splashscreen yourself, you could remove mobile-experience (which implies launch-screen). That will also remove fastclick and mobile-status-bar however, so you may want to add those back.

1 Like

That s confirmed what I was already thinking you have an amazing insight on meteor code !

Thank you so much !

I have seen so many subject about it in internet forum regarding this problem. Typically where people are using angularjs and ionic and where the background is more cordova ionic angular oriented than meteor based.

Thank you again, I believe that it might even work for meteor 1.2 actually.

Hi!
I’m also affected by this issue (or so it seems).

My app takes longer than 6 seconds to load on the first time, which gets me stuck on the on the launch screen when the app is first loaded (it seems to work ok if I exit the app and load it again).

@martijnwalraven, given your above-linked commit, is it right to assume that this should be fixed in 1.3.2? Any idea when will this be released?

Thanks!

Hi @martijnwalraven,

I follow your advice and try the 30 seconds hold. I have mobile-experience@1.0.4 in my app. My Meteor is 1.4.0.1.

But the Splash Screen still did not hold. It’s close in less than 3 seconds. Do you have any idea why?

It seems like launch-screen package is not functioning at all.

Please advice, thank you.

Lesz

Remove mobile-experience this is the one causing the issue

Regards

@purplevoice,

Thanks for your advice, I’ll try it now.

@purplevoice
@martijnwalraven

Guys, I found out at least on my end, the issue is caused by Crosswalk package. Not mobile-experience package.

After I remove Crosswalk package, launch-screen is under control. But with Crosswalk, I’m unable to control launch-screen at all.

Any idea how to fix that?

Sorry a bit dry, I am not using crosswalk