【问题标题】:Cordova overwrites iPhone splash screensCordova 覆盖 iPhone 闪屏
【发布时间】:2015-09-29 06:31:52
【问题描述】:

我正在使用 Visual Studio Tools for Apache Cordova 3.1 CTP 在 Visual Studio 2013 中构建适用于 iOS 的 Cordova 应用程序,但我遇到了 iPhone(和 iPad)图像的问题。当生成要在 iOS 上构建的 XCode 项目时,它们会被覆盖。

在下图中,您可以在左侧看到我的 Visual Studio 项目中的图像。右侧是在 XCode 中打开的发送到 iOS 的项目。那里的图片不是我提供的,而是来自 Cordova 的默认图片。

因此,应用程序是使用默认启动屏幕构建的,而不是我创建的。

我的 config.xml 文件包含以下内容:

<platform name="ios">
    <!-- 1st Gen, 3G & 3GS : 320×480   -->
    <splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/>
    <splash src="res/screen/ios/Default-Portrait~iphone.png" width="320" height="480"/>
    <!-- 4 & 4S            : 640×960   -->
    <splash src="res/screen/ios/Default@2x~iphone.png" width="640" height="960"/>
    <splash src="res/screen/ios/Default-Portrait@2x~iphone.png" width="640" height="960"/>
    <!-- 5, 5C & 5S        : 640×1136  -->
    <splash src="res/screen/ios/Default-568h@2x~iphone.png" width="640" height="1136"/>
    <splash src="res/screen/ios/Default-568h-Portrait@2x~iphone.png" width="640" height="1136"/>
    <!-- 6                 : 750×1334  -->
    <splash src="res/screen/ios/Default-667h@2x~iphone.png" width="750" height="1334"/>
    <splash src="res/screen/ios/Default-667h-Portrait@2x~iphone.png" width="750" height="1334"/>
    <!-- 6 Plus            : 1242×2208, downsampled to 1080 x 1920 -->
    <splash src="res/screen/ios/Default-736h@3x~iphone.png" width="1080" height="1920"/>
    <splash src="res/screen/ios/Default-736h-Portrait@3x~iphone.png" width="1080" height="1920"/>
</platform>

我已经看到 Cordova iOS Splash ScreenCordova 3.4 iOS white screen after splash 并且我已经完成了那里的建议,但没有帮助。

欢迎提出任何建议。

更新:我已在 Windows 和 Mac 上将 Cordova 更新到 5.1.1 版,但对问题没有帮助。

更新:问题是一个明显的错误,文件夹名称是screens 而不是screen

【问题讨论】:

  • 你替换了projectName/platforms/ios/projectName/Resources/splash里面原来的吗?
  • 是的。我放了一张截图,你可以在其中看到其中一张图片。

标签: ios visual-studio cordova splash-screen visual-studio-cordova


【解决方案1】:

这是workaround 的链接。让我们知道这是否适合您。

【讨论】:

  • 感谢您的链接。我会试一试的。
  • 我刚刚意识到我的路径 res/screen/ios 不正确,因为该文件夹名为 screens 而不是 screen。在我修复它适用于标准 Cordova 名称和解决方法链接中提到的名称之后。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-03-18
  • 1970-01-01
  • 2021-07-05
  • 1970-01-01
  • 2015-04-30
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多