PhoneGap Build iOS app has blank white screen after splash screen

后端 未结 7 1801
庸人自扰
庸人自扰 2020-12-04 22:38

I\'m using PhoneGap Build 3.0, attempting to get rid of the blank white screen that appears after the splash screen.

I\'ve done research and all I can find is refere

相关标签:
7条回答
  • 2020-12-04 23:25

    Totally feel your pain on this. The docs for PhoneGap Build need a lot of work. I've been fighting with this the last couple of days myself. After much trial and error, this is what has worked for me.

    Within config.xml:

    <!-- Do not auto hide splash on iOS -->
    <preference name="AutoHideSplashScreen" value="false" />
    <!-- Do not auto hide splash on Android -->
    <preference name="SplashScreenDelay" value="10000"/>
    
    <gap:plugin name="org.apache.cordova.splashscreen" />
    

    Android does not seem to have an AutoHide param, so we just give it a long delay. We will hide it manually with JS before this 10 seconds is reached.

    Adding the plugin reference in the config.xml is needed for the javascript code navigator.splashscreen.hide(); to work.

    Also, I found for my project (using Kendo UI Mobile) that no setTimeout delay was needed within onDeviceReady. I am guessing, that once you get the correct params within your config.xml, you will see the same in your app.

    My onDeviceReady looks like this:

    document.addEventListener('deviceready', function() {
      navigator.splashscreen.hide();
    });
    

    Tested on iOS 6, and Android 4.1 using PhoneGap Build 3.1.

    0 讨论(0)
提交回复
热议问题