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>
```
config.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="[email protected]">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 platform add
https://github.com/apache/cordova-ios/archive/6.1.0.tar.gz
cordova build ios
```
Edit: forgot that you don't need the cordova-plugin-splashscreen since it's
added to cordova-ios since 6.0.0
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]