Removing splash-screen loading gif from Cordova app

Viewed 25477

I'm having a problem overriding Cordova's defaults when writing an app.

I'm writing an iOS app using the Cordova (formerly PhoneGap) framework and Xcode. Cordova lets me add a splash screen for the project by just dragging and dropping it in under the info tab for my project in Xcode. This part works fine, but there is a default loading-indicator gif running over the top of the splash image (I'm not sure whether it's from Xcode or from Cordova).

How can I remove the loading-indicator image?

3 Answers

If you have an IOS device i have a working method that you can use, it solved my problem when compiling for IOS. (Firstly i want to say you need to add an icon and splash in the correct folders or else Cordova will their default ones for you and also make sure that they are large enough so that the resources can be generated accordingly):

  1. Remove the SplashScreen plugin provided using
        cordova plugin rm cordova-plugin-splashscreen
  1. Place your icon in the resources/ios/ folder and name it

icon.png

  1. Go to the route of your directory and add your splash image (make sure that splash.png is 2800px * 2800px)

splash.png enter image description here

  1. Remove the ios platform if you installed it already and then re add it
        ionic cordova platform rm ios
        ionic cordova platform add ios

5.Run the following command to generate your icon

        ionic cordova resources ios --icon

if building for android

        ionic cordova resources android --icon

6.Add the following lines to your config.xml

    <preference name="SplashScreen" value="none" />
    <preference name="SplashScreenDelay" value="0" />
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="FadeSplashScreen" value="false" />
    <preference name="ShowSplashScreenSpinner" value="false" />

This should solve the default icon and remove the splash screen which Cordova adds to the IOS project by default. I hope it helps!

Related