'Cordova iOS 6.2.0 Spash screen disappears before this.splashScreen.hide()
In my Ionic app the splash screen is hidden as soon as webview is loaded. I have tried to debug the issue in Xcode and when I set breakpoint in CDVViewCoontroller.m in function showLaunchScreen() I see that the call to this function is happening form my code after deviceReady event and during this call the Splash Screen already tuned off.
AutoHideSplashScreen is set to true with huge delay, but changing it to false doesn't solves the problem. I do have background set 0x0 - I need my app to be transparent in order to show up over camera view.
It seem like splash screen has z-index lower than main view, because I do see splash screen in the begging, then main view is loaded and I see on the background splash screen, and then after this.splashScreen.hide(); the splash screen disappears from background.
My stack and conig.xml:
Ionic:
Ionic CLI : 6.18.1
Ionic Framework : @ionic/angular 6.0.1
@angular-devkit/build-angular : 13.1.2
@angular-devkit/schematics : 13.1.2
@angular/cli : 13.1.2
@ionic/angular-toolkit : 5.0.3
Cordova:
Cordova CLI : 11.0.0
Cordova Platforms : android 9.0.0, ios 6.2.0
Cordova Plugins :
cordova-plugin-android-permissions 1.0.2 "Permissions"
cordova-plugin-app-version 0.1.12 "AppVersion"
cordova-plugin-camera-preview 0.11.0 "cordova-plugin-camera-preview"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-inappbrowser 4.1.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-nativeaudio 3.0.9 "Cordova Native Audio"
cordova-plugin-splashscreen 6.0.0 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-sqlite-storage 6.0.0 "Cordova SQLite storage plugin - cordova-sqlite-storage plugin version"
Utility:
cordova-res : 0.15.4
native-run : not installed globally
System:
Android SDK Tools : 26.1.1 (/usr/local/share/android-sdk)
ios-sim : 8.0.2
NodeJS : v14.15.0 (/Users/admin/.nvm/versions/node/v14.15.0/bin/node)
npm : 6.14.8
OS : macOS Monterey
Xcode : Xcode 13.2.1 Build version 13C100
Config.xml:
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreen" value="false" />
<preference name="FadeSplashScreenDuration" value="500" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="20000" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="WKWebViewOnly" value="true" />
<preference name="backgroundColor" value="0x00000000" />
Solution 1:[1]
Please check <preference name="AutoHideSplashScreen" value="true" /> in your config.xml and turn it to false
like this:
<preference name="AutoHideSplashScreen" value="true" />
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Anirudhsanthosh |
