Cordova Slack Digest

Tue, 16 Nov 2021 08:21:21 GMT

User count: 4677

Join the conversation at slack.cordova.io

Channel #cordova-ios (12 messages)


Mon, 15 Nov 2021 17:41:19 GMT

@daviesd says

Does anyone know if something has changed with splash screens? I see my app currently in the app store (built over a year ago) is briefly showing a black screen before the splash screen. Rebuilding with the latest cordova-ios also shows the same problem. I've started work on a Capacitor app as well, and I see discussions about it not working there either. Something about the splash screen storyboards. Anyone seen this?

Mon, 15 Nov 2021 17:45:41 GMT

@norman137 says

If you‘re not using a universal storyboard screen, then perhaps you’re missing a screen resolution.

Mon, 15 Nov 2021 17:48:18 GMT

@daviesd says

ok, i don‘t even know what that means, but I’ll look it up. 🙂 Ya, I'm betting there is some new screen resolution requirement that has come out since all the max sizes. let me look at the xcode project (something I rarely do on my Cordova project, but it looks like Capacitor is gonna force me to).

Mon, 15 Nov 2021 17:51:41 GMT

@norman137 says

depending how complex your splashscreen graphic is, you can build a single 2732x2732 image called Default@2x~universal~anyany.png

Mon, 15 Nov 2021 17:52:15 GMT

@norman137 says

You should google the “safe areas”... for example, the edges will be cropped off depending on the actual device resolution

Mon, 15 Nov 2021 17:53:38 GMT

@norman137 says

You could use this image as a guide line... the logo kinda fills the entire safe space, while still including a decent amount of border space so that the logo never touch the edges of the screen, regardless of the resolution of the ios device.

Larger devices obv will show more space around the logo.

Mon, 15 Nov 2021 17:54:14 GMT

@norman137 says

I forget the actual dimensions of what is considered safe

Mon, 15 Nov 2021 17:55:00 GMT

@norman137 says

Lastly, you declare that splash in your config.xml via

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

Mon, 15 Nov 2021 17:55:42 GMT

@daviesd says

ya, that‘s what I have <splash src="res/screens/ios/Default@2x~universal~anyany.png"/> and it’s 2,732 x 2,732

Mon, 15 Nov 2021 17:56:05 GMT

@norman137 says

hmm, then I‘m not sure why you’re seeing a black screen

Mon, 15 Nov 2021 17:57:13 GMT

@daviesd says

but still is black for just a split second when launching, then it appears right. this issue talks about it a bit (from a capacitor perspective) https://github.com/ionic-team/capacitor/issues/3589

Mon, 15 Nov 2021 18:16:10 GMT

@daviesd says

Helpful thread too https://github.com/apache/cordova-ios/issues/990

Channel #cordova-android (1 messages)


Mon, 15 Nov 2021 10:15:14 GMT

@ucheozoemena says

Hi folks, is there a specific method that‘s used to re-initialize/re-render the webview on Android when the device returns to the foreground and the deviceresume event is fired? There’s a full-page flicker that I get when returning to my app, like the full viewport is re-rendered. I‘ve confirmed that disabling hardware acceleration prevents it. Following @norman137’s suggestion I created a plugin that disables hardware rendering when the app is put in the background, and re-enables it when the app is restored to the foreground. This works partially because there seems to be a race condition between when my plugin re-enables hardware rendering and when the source of the flicker is triggered: if my plugin re-enables before the flicker would happen, then it’s like hardware acceleration was never turned off and the flicker still happens. So I‘m considering how to identify the exact point at which the flicker is getting triggered, and I’m suspecting that it‘s something in the native code that’s causing it (the problem happens even if I strip my app down to a single absolutely positioned node in dev tools, so I don‘t think it’s a problem from within the webview). Open to any ideas, thanks!