为什么PhoneGap总是显示默认的splashscreen图像? [英] Why PhoneGap always shows default splashscreen image?

查看:140
本文介绍了为什么PhoneGap总是显示默认的splashscreen图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试一个示例iOS应用程序,虽然我设置所有新的启动图像在Xcode(项目目标屏幕的摘要选项卡),PhoneGap 3.0不断显示其默认启动画面。为什么?即使是splashscreen是一个插件,但现在不包括在PhoneGap 3.0的默认情况下。



iOS文档说的启动图像,但不是splashscreen,甚至强烈建议我们使用第一屏类似于启动图像,不像屏幕。是否相同?

解决方案

这不是关于清理或缓存问题。问题是PhoneGap默认包括项目模板中的所有可能的启动图像。这些文件在Resources文件夹下,并复制到构建事件中的bundle的根文件夹。虽然我在Xcode(目标/摘要屏幕)中正确选择了我自己的启动图像,但默认PhoneGap的具体文件默认〜iphone.png覆盖我的文件:(



一旦发现问题,就可以修复它,但我喜欢以下步骤:


  1. 删除/ platforms / ios / AppName / icons和/ splash文件夹下的所有默认图标和启动画面文件,肯定不需要这些占位符图像。 p>


  2. 在Xcode中,选择Targets / AppName,然后选择构建阶段,删除上述步骤中复制捆绑资源部分中的图像的所有文件名。

    / li>
  3. 添加您自己的图片文件,以便在此处显示应用图标并启动图片。


  4. 编辑Info.plist文件文件AppName-Info.plist在/ platforms / ios / AppName /下)以包含您的图像,您将需要使用CFBundleIcons和UILaunchImageFile键。转到iOS开发人员网站参考。



I'm testing a sample iOS app now, although I set all new launch images in Xcode (Summary tab of Project Target screen), PhoneGap 3.0 keeps showing its default splashscreen. Why? even when splashscreen is a plugin and not included by default in PhoneGap 3.0 now.

iOS document say about launch images but not splashscreen, and it even strongly recommend us to use a "first screen" similar as launch image, not something like about screen. Are these same?

解决方案

It's not about cleaning or caching issues at all. The problem is PhoneGap includes all possible launch images in project template by default. These files are under Resources folder and copied to bundle's root folder on build event. Although I properly selected my own launch images in Xcode (Target/Summary screen), default PhoneGap's specific files e.g. Default~iphone.png overridden my files :(

Once issue is identified, you can fix it someway, but I prefer below steps:

  1. Delete all default icons and splashscreen files under /platforms/ios/AppName/icons and /splash folders. You surely don't need these placeholder images.

  2. In Xcode, select Targets/AppName, then tab Build Phases, delete all file names of images in the above step in section Copy Bundle Resources.

  3. Add your own images files for app icon and launch images here.

  4. Edit Info.plist file (file AppName-Info.plist under /platforms/ios/AppName/) to include your images, you will need to use CFBundleIcons and UILaunchImageFile keys. Go to iOS developer site for reference.

这篇关于为什么PhoneGap总是显示默认的splashscreen图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆