[
https://issues.apache.org/jira/browse/CB-10562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182282#comment-15182282
]
Stanley Mason commented on CB-10562:
------------------------------------
I don't believe this is related to Ionic, but is a bug in the plugin.
To reproduce:
- Add <preference name="SplashScreenDelay" value="20000" /> to config.xml
- Call navigator.splashscreen.hide() after 5 seconds or so
(console.log(performance.now()) to get an exact timestamp
- The splashscreen will not hide until the 20 seconds are up
>From testing various versions of the plugin, I can see that the issue was
>introduced by this commit:
>https://github.com/apache/cordova-plugin-splashscreen/commit/ccb3c2f4533fa52da474c33a7adc5ab5a887a805
The code in the above commit does not take into account that an app may both
manually hide the splashscreen and also have a timeout. Thus when the hide
function is manually invoked, it will still wait SplashScreenDelay ms before
hiding it. Unfortunately I do not know enough about iOS to be able to fix the
issue. For now I am getting around the issue by removing the timeout entirely.
> hide() not working in latest splashscreen plug in 3.1.0 in iOS
> --------------------------------------------------------------
>
> Key: CB-10562
> URL: https://issues.apache.org/jira/browse/CB-10562
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin SplashScreen
> Affects Versions: 3.1.0
> Environment: OSX Yosemite, iOS 9, iPhone 6, XCode 7.2.1, Cordova
> 4.0.1, IONIC app, latest Cordova & IONIC CLIs
> Reporter: Matthias Max
> Priority: Critical
>
> In version 3.0.0 the command navigator.splashscreen.hide(); works fine.
> With the new version 3.1.0 it simply doesn't close the splashscreen. The
> splashscreen keeps on being displayed for the time set in the config.xml.
> config.xml:
> <preference name="SplashScreen" value="screen"/>
> <preference name="AutoHideSplashScreen" value="false"/>
> <preference name="ShowSplashScreenSpinner" value="false"/>
> <preference name="SplashScreenDelay" value="20000"/>
> <preference name="SplashMaintainAspectRatio" value="true"/>
> <preference name="SplashShowOnlyFirstTime" value="false"/>
> <preference name="FadeSplashScreen" value="false"/>
> JS:
> $ionicPlatform.ready(function() {
> // Hide splash screen
> if (navigator.splashscreen) {
> navigator.splashscreen.hide();
> }
> });
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]