UILaunchStoryboardName及其值CDVLaunchScreen被离子准备命令删除了

问题描述 投票:0回答:1

我有一个爱奥尼亚·科尔多瓦(Ionic Cordova)项目,正在尝试确保它在iPhone X和更新的手机上全屏显示。我遇到了诸如this one之类的问题,并且一切正常,直到运行ionic prepare并从.plist文件中删除了<key>UILaunchStoryboardName</key><string>CDVLaunchScreen</string>为止。我尝试添加此内容:

"config_munge": {
"files": {
  "*-Info.plist": {
    "parents": {
      "UILaunchStoryboardName": [
        {
          "xml": "<string>CDVLaunchScreen</string>",
          "count": 1
        }
      ],

到我的ios.json,这无济于事。我也在config.xml文件中尝试过此操作:

<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设置为CDVLaunchScreen,但是所有这些总是被下一个ionic prepare命令覆盖。如何防止覆盖?

P.S。我的Cordova版本是8.1.2,iOS引擎是5.0.0。另外,如果有所作为,请使用以下插件:

  • 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“ Splashscreen”
  • cordova-plugin-statusbar 2.4.3“ StatusBar”
  • cordova-plugin-whitelist1.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“诊断”
ios cordova ionic-framework iphone-x
1个回答
0
投票

我在config.xml文件中没有此文件,因此它正在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" />   
© www.soinside.com 2019 - 2024. All rights reserved.