You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/06/26 10:05:55 UTC

[GitHub] [cordova-ios] zmalter99 edited a comment on issue #918: Calling `navigator.splashscreen.hide()` does not hide the splashscreen

zmalter99 edited a comment on issue #918:
URL: https://github.com/apache/cordova-ios/issues/918#issuecomment-650099178


   I created a test project with the code above and the splashscreen successfully faded away after four seconds from the device ready alert. Here's my code:
   
   www/index.html
   ```
   <!DOCTYPE html>
   <html>
   <head>
       <script type="text/javascript" src="cordova.js"></script>
   </head>
   <body>
       <script>
           document.addEventListener('deviceready', function () {
               alert('deviceready');
               setTimeout(function () {
                   alert('hide now');
                   navigator.splashscreen.hide();
               },4000);
           })
       </script>
       Content goes here...
   </body>
   </html>
   ```
   
   confix.xml
   ```
   <?xml version="1.0" encoding="UTF-8" ?>
   <widget xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="com.example.app" version="1.0">
     <name>Example App</name>
     <description>N/A</description>
     <author href="http://example.com" email="app@example.com">Example App</author>
   
     <preference name="ShowSplashScreenSpinner" value="false" />
     <preference name="SplashShowOnlyFirstTime" value="false" />
     <preference name="AutoHideSplashScreen" value="false" />
   </widget>
   ```
   
   I then ran the following commands in the root of my project:
   ```
   cordova plugin add https://github.com/apache/cordova-plugin-splashscreen/archive/5.0.4.tar.gz
   cordova platform add https://github.com/apache/cordova-ios/archive/6.1.0.tar.gz
   cordova build ios
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org