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 file, the splash screen disappears after about 10 seconds.
{
"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? As already mentioned, it is a standard APP without customization.
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