Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splash screen is not hiding with this.splashscreen.hide() after migrated to cordova-ios >=6 #1066

Closed
1 of 3 tasks
SivasubramanianG opened this issue Jan 29, 2021 · 8 comments

Comments

@SivasubramanianG
Copy link

SivasubramanianG commented Jan 29, 2021

Bug Report

Problem

This issue is started to occur after migrated to cordova-ios 6.0.0

What is expected to happen?

Splash screen automatically hides with no white screen after giving this.splashscreen.hide() in device ready function.

What does actually happen?

Splash screen is not manually hiding even after calling this.splashscreen.hide() in device ready function.
Splash screen is not hiding without AutoHideSplashScreen set to true.
If AutoHideSplashScreen is set to true in config.xml it does not hiding with this.splashscreen.hide(). It is hiding only when setting SplashScreenDelay" value="3000" in config.xml.

Information

Migrate cordova-ios ~5 to 6.0.0.
Upgrade splash screen to 6.0.0 version.

Command or Code

  <preference name="SplashMaintainAspectRatio" value="true" />
 <preference name="FadeSplashScreenDuration" value="300" />
 <preference name="SplashShowOnlyFirstTime" value="false" />
 <preference name="ShowSplashScreenSpinner" value="false" />
 <preference name="SplashScreen" value="screen" />
 <preference name="AutoHideSplashScreen" value="false" />
<platform name="android">
    <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
     <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
     <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
     <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
     <splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
     <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
     <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
     <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
     <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
     <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
     <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
     <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
     <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
     <splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
     <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
     <splash height="1334" src="resources/ios/splash/Default@2x~iphone~anyany.jpg" width="1334" />
     <splash height="2688" src="resources/ios/splash/Default-2688h~iphone.png" width="1242" />
     <splash height="1242" src="resources/ios/splash/Default-Landscape-2688h~iphone.png" width="2688" />
     <splash height="1792" src="resources/ios/splash/Default-1792h~iphone.png" width="828" />
     <splash height="828" src="resources/ios/splash/Default-Landscape-1792h~iphone.png" width="1792" />
</platform>

in Config.xml

this.platform.ready().then(() => {
this.splashscreen.hide();
}

in app.component.ts

Environment, Platform, Device

Ionic:
Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 5.5.1
@angular-devkit/build-angular : 0.803.29
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.3.29
@ionic/angular-toolkit : 2.3.3

Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 6.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 33 other plugins)

Utility:
cordova-res : not installed
native-run (update available: 1.3.0) : 0.3.0

System:
ios-deploy : 1.11.3
ios-sim : 8.0.2
NodeJS : v12.18.3 (/usr/local/bin/node)
npm : 6.14.6
OS : macOS Catalina
Xcode : Xcode 12.2 Build version 12B45b

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@Blackfaded
Copy link

I have the same issue.

@breautek
Copy link
Contributor

breautek commented Feb 4, 2021

I think this issue is describing the same issue at #991, fixed by #1006 & released in cordova-ios@6.2.0.

I would try upgrading to cordova-ios@6.2.0 (coincidentally just released ~30 minutes ago). Let me know if this issue still persists or not.

Thank you,
Norman

@SivasubramanianG
Copy link
Author

Thank you so much for the fix. Its working. Thanks you @breautek for the great support.

Thanks & Regards,
Sivasubramanian G

@breautek
Copy link
Contributor

Glad to hear, I'll close this ticket then.

Cheers!

@adamdport
Copy link

Seems like this might have been closed prematurely, I'm on 6.2.0 and it's not working for me. There are a bunch of other people in apache/cordova-plugin-splashscreen#307 with the same issue. That being said, I don't know where the issue resides, should this be reopened or is the problem with the other repo?

@adamdport
Copy link

@breautek is there anything I can do to help debug this? Setting a breakpoint in the hide method and calling navigator.splashscreen.hide(), I see that the CDVSplashScreen instance has _visible = NO and _destroyed=YES before it even runs setVisible:NO. But it's still showing, I tested on both a simulator and on a real device, both have Cordova-ios@6.2.0. I'm not familiar with iOS development, but would be happy to try to help out if you tell me where to look. Thanks.

@adamdport
Copy link

Nevermind. Uninstalling and reinstalling cordova-ios didn't do anything for me, but uninstalling and reinstalling the plugin seems to work fine:

cordova plugin rm cordova-plugin-splashscreen
cordova plugin add cordova-plugin-splashscreen@6

@alemdg
Copy link

alemdg commented May 25, 2021

Nevermind. Uninstalling and reinstalling cordova-ios didn't do anything for me, but uninstalling and reinstalling the plugin seems to work fine:

cordova plugin rm cordova-plugin-splashscreen
cordova plugin add cordova-plugin-splashscreen@6

cordova-ios 6.2.0, and suddenly stop working, from 1 compilation to the next compilation, same code, same versions.

This was the final solution to me.
Thanks adam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants