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
}
],
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>
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. 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:
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" />