0

I created a html, javascript game and it was deployed to my iphone using cordova and Xcode, the problem is when I launched my app and the moment it finished loading, the launch image fades out to a white screen before displaying my game. I think its a default behaviour. I have researched on how to prevent it from fading out, and this is what i found: iOS 7 launch image (splash screen) fades out

But the answer seems to be outdated because I don't have a file called AppController and it requires some knowledge in Objective-C which I did't learn.

Please help me... I just want to get rid of that split second fading to white screen issue.

-Edit-

I realized that in iOS, the splashscreen images are called launch images but I decided to install the splash screen plugin and test my app again and now the splash screen/ launch image behave a little differently, instead of fading to a white screen, it fades to my game immediately, but I do not want the fade effect so I edited the config.xml file like this, but it still fades.

Here is part of my config.xml file

<platform name="ios">
    <allow-intent href="itms:*" />
    <allow-intent href="itms-apps:*" />

   <splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/>
   <splash src="res/screen/ios/Default@2x~iphone.png" width="640" height="960"/>
   <splash src="res/screen/ios/Default-Portrait~ipad.png" width="768" height="1024"/>
   <splash src="res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
   <splash src="res/screen/ios/Default-Landscape~ipad.png" width="1024" height="768"/>
   <splash src="res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
   <splash src="res/screen/ios/Default-568h@2x~iphone.png" width="640" height="1136"/>
   <splash src="res/screen/ios/Default-667h.png" width="750" height="1334"/>
   <splash src="res/screen/ios/Default-736h.png" width="1242" height="2208"/>
   <splash src="res/screen/ios/Default-Landscape-736h.png" width="2208" height="1242"/>

</platform>
<engine name="ios" spec="^4.4.0" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.0" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-plugin-splashscreen" spec="^4.1.0" />


<preference name="FadeSplashScreen" value="false"/>
guy1733
  • 59
  • 9

1 Answers1

0

The fade preference refers to the animation.

If you want that the splash screen doesn't automatically disappear you have to use this preference:

<preference name="AutoHideSplashScreen" value="false" />

Then you will have to hide it whenever you want with this javascript code:

navigator.splashscreen.hide();

jcesarmobile
  • 51,328
  • 11
  • 132
  • 176
  • Hi, I forgot to mention that I deployed the app through Xcode not the terminal (I use mac) and because of that, during the process of deploying though Xcode, that process did not take the config.xml into account thus, the splash screen features (e.g duration) falls back to its default values, but if I were to deploy though Xcode, the config.xml is recognised and I was able to see some changes, thanks for the help tough :) – guy1733 Dec 30 '17 at 14:06