Reputation: 1871
I added splash.png to default root(with index.html path) Then I added splash plugin to config.xml
<preference name="phonegap-version" value="cli-6.3.0" />
<preference name="SplashScreenDelay" value="5000" />
<plugin name="cordova-plugin-splashscreen" source="npm" />
<splash src="splash.png" />
What is wrong with this?Why it does not show my splash.png?It shows phonegap default splash icon
Upvotes: 1
Views: 975
Reputation: 5313
Splash screens are notoriously tricky to get right. I've always had issues when only using the one "splash.png" image, so I recommend sizing one splash screen for your current device, then add in the others. Leverage the following sizes, making sure that the folder structure and image dimensions match exactly. Otherwise, the default PhoneGap one will display instead.
NOTE: The folder paths do not have to be the following: "splash/ios". Same with the file names such as "Default-568h@2x~iphone.png" - you can name them anything you want, as long as the actual filename matches!
<!-- iPhone 5 / iPod Touch (5th Generation) -->
<splash src="splash/ios/Default-568h@2x~iphone.png" platform="ios" width="640" height="1136" />
<!-- iPhone 6 -->
<splash src="splash/ios/Default-667h.png" platform="ios" width="750" height="1334" />
<splash src="splash/ios/Default-736h.png" platform="ios" width="1242" height="2208" />
<splash src="splash/ios/Default-Landscape-736h.png" platform="ios" width="2208" height="1242" />
<!-- iPad -->
<splash src="splash/ios/Default-Portrait~ipad.png" platform="ios" width="768" height="1024" />
<splash src="splash/ios/Default-Landscape~ipad.png" platform="ios" width="1024" height="768" />
<!-- Retina iPad -->
<splash src="splash/ios/Default-Portrait@2x~ipad.png" platform="ios" width="1536" height="2048" />
<splash src="splash/ios/Default-Landscape@2x~ipad.png" platform="ios" width="2048" height="1536" />
Upvotes: 1