我在 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" />
最佳答案
是的,您的 config.xml 应该始终指向启动画面的正确位置。
虽然 Xcode 在选择初始屏幕时会忽略 config.xml,但 Cordova CLI 不会。尝试使用 CLI 构建和运行将失败。
此外,诸如 PhoneGap Build 之类的服务将无法构建您的应用程序,甚至某些插件也会由于格式错误的 config.xml 而导致随机错误,其中路径指向不存在的文件。
关于css - Cordova 闪屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20064865/