如何在 Cordova 中将单个图像用于 ios 初始屏幕

How to use a single image for ios splash screen in Cordova

我有一个带有启动画面的简单 Cordova 应用程序。在 config.xml 我有这个:<splash src="www/img/splash.png" />。在 Android 上,我看到了自定义图像,在 iOS 上,我看到了默认的 Cordova 图像。

我看过 https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/ 中的文档,其中描述了一个设置,例如 30 张不同分辨率的不同图像等。我宁愿不这样做,我只想要与 Android, 显示我已缩放以适合的一张图像。

我该怎么做?

这是您的解决方案:

Once the image is created, you can include it in your project by adding the following to config.xml:

<splash src="res/screen/ios/Default@2x~universal~anyany.png" />

Because only one image is provided, iOS will utilize it in every context.