Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

SplashScreen hide not working as expected

$
0
0

@MarioGruda wrote:

Hello everyone,

I have a small problem with the SplashScreen.

I’m using the new AppWizard and a standard APP with Capacitor and Menu Template (no customization).

In app.component.ts the SplashScreen seems to be switched off as soon as the platform is ready:

 this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      this.splashScreen.hide();
    });

On a OnePlus 3T, the SplashScreen takes approximately 3 seconds to disappear (seems to be the default time the SplashScreen is shown). If I delete the line of code this.splashScreen.hide(); the time does not change as expected.

If I use the launchShowDuration setting and set it to 10 seconds in the capacitor.config.json, the SplashScreen needs this time until it disappears.

{
  "appId": "io.ionic.starter"
  "appName": "splash-test",
  "bundledWebRuntime": false,
  "npmClient": "npm",
  "webDir": "www",
  "cordova": {}
  "plugins": {
    "SplashScreen." {
      "launchShowDuration": 10,000
    }
  }
}

If I set ‘LaunchShowDuration’ to 0, the splash screen appears very briefly, then a white image and the application only needs about 1.5 seconds to start. I would have expected that the time would match the test where the SplashScreen is closed programmatically as soon as the application is ready, but the application now starts twice as fast.

If I set the setting ‘launchAutoHide’: false, and comment on ‘this.splashScreen.hide()’ again, the SplashScreen never disappears. It seems that this.splashScreen.hide(); has no effect on the splashScreen at all.

Am I doing something wrong?

Off-Topic:
One small thing I noticed: cordova-res --skip-config --copy creates a directory ios\App\public without adding an IOS project before.

Thank you very much and best regards
Mario

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>