科尔多瓦飞溅屏幕

时间:2013-11-19 06:40:38

标签: ios iphone css cordova

我在phonegapp应用程序中设置了所有内容。在我拖放CordovaLib.xcodeproj然后更改我的应用程序图标内的启动画面&屏幕文件夹。但仍然app加载cordovaLib启动画面。所以,我删除了CordovaLib项目的屏幕,它正在工作。我的启动画面名称为Default.png,Default @ 2x.png等。但在config.xml文件中有其他名称。但我的应用程序使用适当的屏幕。我需要在config.xml文件中进行更改。

enter image description here

<gap:splash gap:platform="ios" height="480" src="res/screen/ios/Default.png" width="320" />
<gap:splash gap:platform="ios" height="960" src="res/screen/ios/Default_at_2x.png" width="640" />
<gap:splash gap:platform="ios" height="1136" src="res/screen/ios/Default-568h_at_2x.png" width="640" />
<gap:splash gap:platform="ios" height="1024" src="res/screen/ios/Default-Portrait~ipad.png" width="768" />
<gap:splash gap:platform="ios" height="768" src="res/screen/ios/Default-Landscape~ipad.png" width="1024" />
<gap:splash gap:platform="ios" height="2048" src="res/screen/ios/Default-Portrait_at_2x~ipad.png" width="1536" />
<gap:splash gap:platform="ios" height="1536" src="res/screen/ios/Default-Landscape_at_2x~ipad.png" width="2048" />

1 个答案:

答案 0 :(得分:1)

是的,您的config.xml应始终指向启动屏幕的正确位置。

虽然Xcode在选择启动画面时会忽略config.xml,但Cordova CLI却没有。尝试使用CLI构建和运行将失败。

此外,诸如PhoneGap Build之类的服务将无法构建您的应用程序,甚至一些插件也会因为config.xml格式错误而导致随机错误,其中路径指向不存在的文件。