Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/122.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Cordova-如何避免启动屏幕?_Android_Ios_Cordova - Fatal编程技术网

Android Cordova-如何避免启动屏幕?

Android Cordova-如何避免启动屏幕?,android,ios,cordova,Android,Ios,Cordova,我不希望我的Cordova项目(Android和iOS)出现闪屏,如何删除它?我试图禁用闪屏插件,但它仍然出现!如何解决 <?xml version="1.0" encoding="utf-8" standalone="no"?> <widget xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="app.appname" version="1.0.0">

我不希望我的Cordova项目(Android和iOS)出现闪屏,如何删除它?我试图禁用闪屏插件,但它仍然出现!如何解决

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="app.appname" version="1.0.0">
    <name>App name</name>
    <description>
        App name description
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html"/>
    <plugin name="cordova-plugin-whitelist" spec="1"/>
    <access origin="*"/>
    <allow-intent href="http://*/*"/>
    <allow-intent href="https://*/*"/>
    <allow-intent href="tel:*"/>
    <allow-intent href="sms:*"/>
    <allow-intent href="mailto:*"/>
    <allow-intent href="geo:*"/>
    <platform name="android">
        <allow-intent href="market:*"/>
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*"/>
        <allow-intent href="itms-apps:*"/>
    </platform>
    <preference name="SplashScreen" value="none"/>
</widget>

应用程序名称
应用程序名称说明
阿帕奇科尔多瓦团队

当您在项目中使用cordova时,您可以通过将此标记添加到config.xml来轻松删除初始屏幕

<preference name="SplashScreen" value="none"/>

如果选项:

<preference name="SplashScreen" value="none"/>
在您的config.xml中必须有splashscreen插件

<gap:plugin name="org.apache.cordova.splashscreen" />

如果此选项不起作用,您可以在默认情况下将splashscreen图像置为空白并放入config.xml中

<gap:splash src="splash.png" /

请。在config.xml中进行如下更改:

<preference name="AutoHideSplashScreen" value="true" />
<preference name="SplashScreenDelay" value="0"/>

啊,终于!我也在为同样的问题挣扎。看起来——至少对于IOS版本来说——无论我尝试了什么,启动屏幕都是必须的

我发现我可以为每个支持的/推荐的大小添加png文件,然后启动程序会使用该文件。我选择了一个合适的图片,但如果你愿意,你可以创建一个空白(白色或黑色)png

Phonegap或IOS对所有不同尺寸的手机都很挑剔,所以请提供所有手机

<platform name="ios">
    <icon platform="ios" src="www/res/icon/ios/icon.png"          height="57"  width="57" />
    <icon platform="ios" src="www/res/icon/ios/icon@2x.png"       height="114" width="114" />
    <icon platform="ios" src="www/res/icon/ios/icon-40.png"       height="40"  width="40" />
    <icon platform="ios" src="www/res/icon/ios/icon-40@2x.png"    height="80"  width="80" />
    <icon platform="ios" src="www/res/icon/ios/icon-50.png"       height="50"  width="50" />
    <icon platform="ios" src="www/res/icon/ios/icon-50@2x.png"    height="100" width="100" />
    <icon platform="ios" src="www/res/icon/ios/icon-60.png"       height="60"  width="60" />
    <icon platform="ios" src="www/res/icon/ios/icon-60@2x.png"    height="120" width="120" />
    <icon platform="ios" src="www/res/icon/ios/icon-60@3x.png"    height="180" width="180" />
    <icon platform="ios" src="www/res/icon/ios/icon-72.png"       height="72"  width="72" />
    <icon platform="ios" src="www/res/icon/ios/icon-72@2x.png"    height="144" width="144" />
    <icon platform="ios" src="www/res/icon/ios/icon-76.png"       height="76"  width="76" />
    <icon platform="ios" src="www/res/icon/ios/icon-76@2x.png"    height="152" width="152" />
    <icon platform="ios" src="www/res/icon/ios/icon-small.png"    height="29"  width="29" />
    <icon platform="ios" src="www/res/icon/ios/icon-small@2x.png" height="58"  width="58" />
    <icon platform="ios" src="www/res/icon/ios/icon-small@3x.png" height="87"  width="87" />
    <splash src="splash.png" width="320" height="480" />

    <!-- iPhone and iPod touch -->
    <splash src="www/res/splash/ios/default.png" platform="ios" width="320" height="480" />
    <splash src="www/res/splash/ios/default@2x.png" platform="ios" width="640" height="960" />

    <!-- iPhone 5 / iPod Touch (5th Generation) -->
    <splash src="www/res/splash/ios/default-568h@2x.png" platform="ios" width="640" height="1136" />

    <!-- iPhone 6 -->
    <splash src="www/res/splash/ios/default-667h@2x.png" platform="ios" width="750" height="1334" />
    <splash src="www/res/splash/ios/default-portrait-736h@3x.png" platform="ios" width="1242" height="2208" />
    <!--<splash src="www/res/splash/ios/default-landscape-736h@3x.png" platform="ios" width="2208" height="1242" />-->

    <!-- iPad -->
    <splash src="www/res/splash/ios/default-portrait.png" platform="ios" width="768" height="1024" />
    <!--<splash src="www/res/splash/ios/default-landscape.png" platform="ios" width="1024" height="768" />-->

    <!-- Retina iPad -->
    <splash src="www/res/splash/ios/default-portrait@2x.png" platform="ios" width="1536" height="2048" />
    <!--<splash src="www/res/splash/ios/default-landscape@2x.png" platform="ios" width="2048" height="1536" />-->
</platform>


在iOS中,在用户申请与应用程序启动和应用程序已加载并准备运行的绑定期间,将出现一个启动屏幕。这不是一个“启动屏幕”,有些应用程序在启动屏幕后也会有启动屏幕,这是苹果公司不鼓励的。你可以直接尝试删除/修改android和ios的源代码。@SanifSS我不相信为了这么简单和无关紧要的事我必须这么做……你用的是什么cordova版本?我正在使用CLI V 5.4.1中的cordova,默认创建的应用程序没有启动屏幕。@HishamAbdel Hafez我正在将cordova 5.4.1与Netbeans IDE一起使用。Joy,这对您有用吗?我有同样的问题,但这两个设置没有区别。
<platform name="ios">
    <icon platform="ios" src="www/res/icon/ios/icon.png"          height="57"  width="57" />
    <icon platform="ios" src="www/res/icon/ios/icon@2x.png"       height="114" width="114" />
    <icon platform="ios" src="www/res/icon/ios/icon-40.png"       height="40"  width="40" />
    <icon platform="ios" src="www/res/icon/ios/icon-40@2x.png"    height="80"  width="80" />
    <icon platform="ios" src="www/res/icon/ios/icon-50.png"       height="50"  width="50" />
    <icon platform="ios" src="www/res/icon/ios/icon-50@2x.png"    height="100" width="100" />
    <icon platform="ios" src="www/res/icon/ios/icon-60.png"       height="60"  width="60" />
    <icon platform="ios" src="www/res/icon/ios/icon-60@2x.png"    height="120" width="120" />
    <icon platform="ios" src="www/res/icon/ios/icon-60@3x.png"    height="180" width="180" />
    <icon platform="ios" src="www/res/icon/ios/icon-72.png"       height="72"  width="72" />
    <icon platform="ios" src="www/res/icon/ios/icon-72@2x.png"    height="144" width="144" />
    <icon platform="ios" src="www/res/icon/ios/icon-76.png"       height="76"  width="76" />
    <icon platform="ios" src="www/res/icon/ios/icon-76@2x.png"    height="152" width="152" />
    <icon platform="ios" src="www/res/icon/ios/icon-small.png"    height="29"  width="29" />
    <icon platform="ios" src="www/res/icon/ios/icon-small@2x.png" height="58"  width="58" />
    <icon platform="ios" src="www/res/icon/ios/icon-small@3x.png" height="87"  width="87" />
    <splash src="splash.png" width="320" height="480" />

    <!-- iPhone and iPod touch -->
    <splash src="www/res/splash/ios/default.png" platform="ios" width="320" height="480" />
    <splash src="www/res/splash/ios/default@2x.png" platform="ios" width="640" height="960" />

    <!-- iPhone 5 / iPod Touch (5th Generation) -->
    <splash src="www/res/splash/ios/default-568h@2x.png" platform="ios" width="640" height="1136" />

    <!-- iPhone 6 -->
    <splash src="www/res/splash/ios/default-667h@2x.png" platform="ios" width="750" height="1334" />
    <splash src="www/res/splash/ios/default-portrait-736h@3x.png" platform="ios" width="1242" height="2208" />
    <!--<splash src="www/res/splash/ios/default-landscape-736h@3x.png" platform="ios" width="2208" height="1242" />-->

    <!-- iPad -->
    <splash src="www/res/splash/ios/default-portrait.png" platform="ios" width="768" height="1024" />
    <!--<splash src="www/res/splash/ios/default-landscape.png" platform="ios" width="1024" height="768" />-->

    <!-- Retina iPad -->
    <splash src="www/res/splash/ios/default-portrait@2x.png" platform="ios" width="1536" height="2048" />
    <!--<splash src="www/res/splash/ios/default-landscape@2x.png" platform="ios" width="2048" height="1536" />-->
</platform>