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>
。我尝试添加这个:
"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 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
中删除它:
<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" />
我有一个 Ionic Cordova 项目,我试图确保它在 iPhone X 和更新的手机上全屏显示。我已经回答了 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 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
中删除它:
<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" />