【发布时间】:2017-09-17 03:22:09
【问题描述】:
我正在使用带有平台 ios 4.3.1 的 Cordova 6.5.0。我已经安装了 SplashScreen 插件并且正在使用Legacy Launch Images
我已经准备了以下尺寸的启动画面,将它们添加到 config.xml 并放置在 project_folder/res/screen/ios 中
<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-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"/>
<preference name="SplashScreenDelay" value="10000" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="SplashShowOnlyFirstTime" value="false" />
构建应用程序后,我可以在 Xcode 中看到上述所有图像都反映在未分配类别下的 LaunchImage 资产目录中。
当我在 iPhone 5 (iOS 10) 上运行应用程序时,我会看到一个启动屏幕,然后是一个持续 1 秒的白屏(带有加载指示器),然后是应用程序的主屏幕。同样在 Xcode 控制台中,我可以看到以下警告
WARNING: The splashscreen image named Default-568h was not found
而我希望它显示启动屏幕 10 秒 (SplashScreenDelay)
【问题讨论】:
-
@KKRocks:我已经尝试过了,但行为是一样的。
-
您有两张 640x1136 的图像。检查你在 res/screen/ios/ 中真正拥有哪一个,并且只在 config.xml 中引用它。还要确保它确实有那个大小。
-
@jcesarmobile:我删除了上面的配置并重建了代码,但同样的问题
-
如果您删除了它,请使用您当前的值更新您的问题
标签: ios cordova cordova-plugins