Cordova Slack Digest

Wed, 24 Aug 2022 08:21:52 GMT

User count: 4696

Join the conversation at slack.cordova.io

Channel #general (7 messages)


Tue, 23 Aug 2022 14:28:26 GMT

@little.grief says

howdy good people, I need a little clarification with something please... in response to the recent changes for Google Play Store submission requirements, I'm currently cleaning up 5 mobile apps, 1 of which is quite recent (last release used cordova-android@10.1.2 and cordova-ios@6.2.0), while the other 4 are in dire need of upgrades (the oldest of which last used cordova-android@8.1.0 and cordova-ios@6.0.0).

in order to tackle the process of upgrading all 4 apps to target Android 12, I opted to create an entirely new project using the current latest Ionic, Cordova, and Angular releases, thinking that this should require the least overall changes. thing is, I‘m now stuck at trying to sort out the splashscreen images for these apps... cordova-res has too many issues, it’s replacement capacitor-assets warns that it “isn't quite ready for use”, and based on that name, it might not even help me with this anyway.

in my search for more details, I found the following points:

do we need to prepare these Android “splashscreen” and iOS “storyboard” images manually at the moment? do I still need cordova-plugin-splashscreen here? did I perhaps miss something else along the way?

Tue, 23 Aug 2022 14:31:06 GMT

@dpogue says

The splashscreen plugin code has been moved into cordova-ios and cordova-android in the latest versions of those platforms (since splashscreens are no longer optional on either of those platforms). So you shouldn't need the plugin anymore

Tue, 23 Aug 2022 14:31:45 GMT

@dpogue says

For iOS, everything in config.xml should keep working the same as before

Tue, 23 Aug 2022 14:36:58 GMT

@dpogue says

The iOS side of the splashscreen stuff happened in 6.0.0, so I think you would already have been running that code

Tue, 23 Aug 2022 15:07:54 GMT

@little.grief says

thanks @dpogue, good to know I'm at least on the right path with removing cordova-plugin-splashscreen..

as for the cordova-ios@6 side of things, the most up-to-date application still contains 18 <splash> entries for the iOS platform, only one of which appears to be a “storyboard” image, generated as:

&lt;splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" /&gt; whereas the config.xml example in <https://cordova.apache.org/docs/en/11.x/core/features/splashscreen/#example-configuration|the Cordova docs> show many more “universal” images:

    &lt;splash src="res/screen/ios/Default@2x~universal~anyany.png" /&gt;
    &lt;splash src="res/screen/ios/Default@2x~universal~comany.png" /&gt;
    &lt;splash src="res/screen/ios/Default@2x~universal~comcom.png" /&gt;
    &lt;splash src="res/screen/ios/Default@3x~universal~anyany.png" /&gt;
    &lt;splash src="res/screen/ios/Default@3x~universal~anycom.png" /&gt;
    &lt;splash src="res/screen/ios/Default@3x~universal~comany.png" /&gt;
&lt;/platform&gt;```
does this mean the other 17 images are no longer relevant? I was under the impression that I wasn't "done" moving the iOS side over to storyboard launch images _yet_.

the same docs page shows an `xml` file for the Android config, but I haven't looked into making that yet.. is it possible to use a `png` for the `AndroidWindowSplashScreenAnimatedIcon` preference entry here? should this just be the largest `2732x2732` image then?

Tue, 23 Aug 2022 15:12:53 GMT

@dpogue says

I can‘t speak to the Android side, since I haven’t used the new splashscreen code there, but on iOS you‘ll need to provide a storyboard image. I think as long as you provide a @2x~universal~anyany.png you’ll be fine. All the other sizes are if you want specific images to show on landscape vs portrait and on different devices (iPhone and iPad)

Tue, 23 Aug 2022 16:01:05 GMT

@norman137 says

For iOS personally I just use a 2732x2732, you have to be careful not to utilise the entire space as they will be clipped off depending on the device, there is a “safe” space to use. I forget the explicit dimensions for the safe space, but my work graphic utilizes most of the “safe” space so you can use it for reference.

For android, the new android splashscreen stuff is... well bad imo. Android stripped you from a lot of control over the splashscreen. You can specify the background color of the splashscreen and supply an image. The allocated space for the image is a tiny bit larger than a typical app icon. The android docs shows the display pixel ratios and some images demonstrating the size: https://developer.android.com/guide/topics/ui/splash-screen#splash_screen_dimensions