Cordova(IOS)扭曲的闪屏

时间:2016-01-27 18:41:01

标签: ios cordova

我的问题是,在我的仅限风景的Cordova应用程序(第一张图片)中,启动画面会失真。几秒钟后,飞溅正确显示(第二张图像)。

我已在res / screen / ios中创建了所有启动画面,并完全按照https://cordova.apache.org/docs/en/latest/config_ref/images.html中的说明配置了config.xml。

我尝试了Cordova s​​plashscreen插件(https://github.com/apache/cordova-plugin-splashscreen),但后来我只得到一个黑屏(文档为你的想象留下了很多东西(" SplashScreen(字符串)。用于的资源名称显示启动画面。不同的平台使用这个值。" ?? ??。所以我可能无法正确配置它。

Skewed splash screen

Correct splash screen

我的config.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget id="se.mycompany.test" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Test</name>
    <description>
        Test
    </description>
    <author email="my@email.com" href="http://www.mywebsite.se">
        MyCompany
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <plugin name="cordova-plugin-splashscreen" spec="1" />
    <preference name="SplashScreen" value="Default~iphone.png" />
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="SplashScreenDelay" value="1" />
    <preference name="SplashMaintainAspectRatio" value="false" />
    <preference name="SplashShowOnlyFirstTime" value="true" />
    <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:*" />
    <preference name="Orientation" value="landscape" />
    <preference name="fullscreen" value="true" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <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>
</widget>

1 个答案:

答案 0 :(得分:0)

这似乎是Cordova 3的问题。更新后问题解决了。