UILaunchStoryboardName及其值CDVLaunchScreen被ionic prepare命令删除 [英] UILaunchStoryboardName and it's value CDVLaunchScreen is being removed by ionic prepare command
问题描述
我有一个爱奥尼亚·科尔多瓦(Ionic Cordova)项目,并试图确保它在iPhone X和更新的手机上全屏显示.我已经问过诸如这一个之类的问题正常运行,直到运行ionic prepare
并将其从.plist文件中删除<key>UILaunchStoryboardName</key><string>CDVLaunchScreen</string>
为止.我尝试添加此内容:
I have a Ionic Cordova project and am trying to make sure that it is fullscreen on iPhone X and newer phones. I have gone to questions like this one and everything works fine until I run ionic prepare
and it removes <key>UILaunchStoryboardName</key><string>CDVLaunchScreen</string>
from the .plist file. I tried adding this:
"config_munge": {
"files": {
"*-Info.plist": {
"parents": {
"UILaunchStoryboardName": [
{
"xml": "<string>CDVLaunchScreen</string>",
"count": 1
}
],
到我的ios.json并没有帮助.我也在config.xml文件中尝试过此操作:
to my ios.json and that doesn't help. I also tried this in my config.xml file:
<platform name="ios">
<config-file parent="UILaunchStoryboardName" target="*-Info.plist">
<string>CDVLaunchScreen</string>
</config-file>
那无济于事.如果我同时在Info > Custom iOS Target Properties
和General > App Icons and Launch Images > Launch Screen File
中都设置了它,但是所有这些总是被下一个ionic prepare
命令覆盖.如何防止被覆盖?
And that doesn't help. If I set it in both the Info > Custom iOS Target Properties
and set the General > App Icons and Launch Images > Launch Screen File
to CDVLaunchScreen
but all that always gets overwritten with the next ionic prepare
command. How do I prevent that from being overwritten?
P.S.我的Cordova版本是8.1.2,iOS引擎是5.0.0.另外,如果有所作为,请使用我的插件:
P.S. my Cordova version is 8.1.2 and iOS is engine is 5.0.0. Also, if it makes a difference, here are my plugins:
- cordova-plugin-cocoapod-support 1.6.2"Cordova CocoaPods依赖关系支持"
- cordova-plugin-device 2.0.2设备"
- cordova-plugin-screen-orientation 3.0.2屏幕方向"
- cordova-plugin-splashscreen 5.0.2启动画面"
- cordova-plugin-statusbar 2.4.3"StatusBar"
- cordova-plugin-whitelist 1.3.4白名单"
- cordova-plugin-wkwebview-engine 1.2.2-dev"Cordova WKWebView Engine" cordova-plugin-wkwebviewxhrfix 0.1.0"WKWebView XHR Fix"
- cordova.plugins.diagnostic 5.0.1诊断"
- cordova-plugin-cocoapod-support 1.6.2 "Cordova CocoaPods Dependency Support"
- cordova-plugin-device 2.0.2 "Device"
- cordova-plugin-screen-orientation 3.0.2 "Screen Orientation"
- cordova-plugin-splashscreen 5.0.2 "Splashscreen"
- cordova-plugin-statusbar 2.4.3 "StatusBar"
- cordova-plugin-whitelist 1.3.4 "Whitelist"
- cordova-plugin-wkwebview-engine 1.2.2-dev "Cordova WKWebView Engine" cordova-plugin-wkwebviewxhrfix 0.1.0 "WKWebView XHR Fix"
- cordova.plugins.diagnostic 5.0.1 "Diagnostic"
推荐答案
我在config.xml文件中没有此文件,因此它已在cordova prepare
中将其删除:
I didn't have this in the config.xml file and so it was removing it in cordova prepare
:
<splash src="res/screen/ios/Default@2x~iphone~anyany.png" />
<splash src="res/screen/ios/Default@2x~iphone~comany.png" />
<splash src="res/screen/ios/Default@2x~iphone~comcom.png" />
<splash src="res/screen/ios/Default@3x~iphone~anyany.png" />
<splash src="res/screen/ios/Default@3x~iphone~anycom.png" />
<splash src="res/screen/ios/Default@3x~iphone~comany.png" />
<splash src="res/screen/ios/Default@2x~ipad~anyany.png" />
<splash src="res/screen/ios/Default@2x~ipad~comany.png" />
这篇关于UILaunchStoryboardName及其值CDVLaunchScreen被ionic prepare命令删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!