【问题标题】:Cordova splash screen科尔多瓦闪屏
【发布时间】:2013-12-02 14:40:19
【问题描述】:

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

<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" />

【问题讨论】:

  • 将图片文件名改为screen-iphone-portrait.png,screen-iphone-portrait-2x 并替换为src="res/screen/ios/"
  • 但是我的应用在没有 screen-iphone-portrait.png 名称的情况下工作
  • 它是否显示图像?
  • 它正在显示图像...
  • 清楚现在显示的是什么图像

标签: css ios iphone cordova splash-screen


【解决方案1】:

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

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

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

【讨论】:

  • @user2967559 更改您的 config.xml 以指向您想要显示的正确初始屏幕。
  • 启动画面以正确的图像显示,没有变化。
  • @user2697559 是的,它会的,但没关系 - 改变它,否则你以后会有问题(见我的回答)。
  • @user2967559 也许,但没有看到完整的文件夹结构,我不能确定。只要确保完整路径是正确的,它应该是好的。
猜你喜欢
  • 1970-01-01
  • 2015-06-10
  • 1970-01-01
  • 2021-01-02
  • 1970-01-01
  • 2015-10-12
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多