Search code examples
iosiphonecordovasplash-screen

How to make splashscreenimage to work in ios phonegap apps?


i'm developing phonegap app 2.9.0 in visual studio 2012 on windows 8. When i run my app in windows emulator everything works fine. I used adobe.phonegap.build to build my app for ios. And build worked properly and installed that .ipa file in my iphone everything works fine other than splashscreenimage. Instead of that a white background is appearing in my iphone. Is there any way to make my splashscreen to work?

Somebody please help..


Solution

  • Unless otherwise specified in a config.xml, iOS platform will try to use the default icon.png during compilation. To define specific icons please use the guide provided: Configure Icons and Splash Screens.

    The default icon must be named icon.png and must reside in the root of your application folder.

    Also,Using a splash screen is rather easy via the PhoneGap Build config.xml file.

    Write a bit of JavaScript that made use of the PhoneGap Splash Screen API:

    document.addEventListener("deviceready", function(e) {
        window.setTimeout(function() {
            navigator.splashscreen.hide();
        },5000);
    
    }, "false");