WKWebView / Crosswalk

Mike currently released a post about the WKWebView.
I’m not sure what this means to me, as I use Crosswalk (cordova-plugin-crosswalk-webview) in my Ionic 3 app.

Does the WKWebView replace Crosswalk in my app and should I hence remove Crosswalk and add the WKWebView? How are they related? What are the advantages / disadvantages of using either one?

Any help on this is appreciated. Thank you!

Wkwebview is a technology, part of safari for iOS. Nothing to do with Android as far as I know. Safari switched its rendering engine to this a few years back, but kept the old one for compatibility - using this plugin gives you the latest.

Crosswalk was for Android in particular (though did port certain aspects to others) to bridge the functionality gap between what android 4.x would give you as the chrome version versus what you got with actual chrome - it was tied to the OS. From Android 5.x however Chrome itself determines the engine in use instead - brill as it means you’re not waiting on manufacturers to update the Android version to get the latest.


Thank you for the explanation, @Judgewest2000.

I just saw, that crosswalk development stopped with version 23. Would you, hence, suggest that using crosswalk is unnecessary in current Ionic apps?

If you can avoid Crosswalk, you should, because there’s no future-proofing for it. But if your app needs to run on older Android devices, you might need it (or “need” it).

Okay, thank you, @AaronSterling.

Stop using it.

The 4.x market share is dwindling by the day. They can have a slightly worse time of it till they upgrade.

1 Like

Removing the crosswalk plugin from my app leads to ridiculously slow css transitions on my Android test device (Android 7, so removing crosswalk shouldn’t make any difference?).

Do I have to update, install or configure anything else to make it run smoothly?

Suspect something else wrong with your setup if that’s the case, e.g your hardware acceleration is turned off or something. Not a situation I’m familiar with so you’ll need to do further investigation.

I often say in these cases if you are willing to share your repo I’m happy to have a quick gander but the choice is yours.

Thank you! Hardware acceleration seems to do the trick. In my case, I just added the following css code to enable hardware acceleration:

/* Enable hardware acceleration to fix laggy transitions */
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
-o-transform: translateZ(0);
transform: translateZ(0);

more info on this

1 Like

Top man - well done!

I noticed one strange thing: After removing crosswalk, the “base” font-size seems to have been reduced. All texts which are defined with font-size: x rem seem to be much smaller. Same with buttons…

However (and that feels strange), this is only the case when running on device (Android). Nothing changed when running in browser…

Any idea why? Would you suggest correcting this using $font-size-root? However, this will probably increase the font-size for iOS as well…

Hum… Not a lot in that area should really change a huge amount - maybe a little interpretation re font size and disability settings of the device as they do have an effect.

I tend to suggest first principles for this type of thing. If you have (only for testing of course) any scss that might be affecting it, remove that and see if looks right on a generic basis.

The other thing to try is create a completely blank app and see if that at least looks okay.

It was disappointing to see crosswalk stop. Browsers keep changing things that potentially damage perfectly working apps. Crosswalk was a good option to make sure you controlled the core web engine. Its not just for old phones.

Chrome developers are especially known to ‘deem features unfit’ with a broad brush. Case in point, they took off support for basic authentication in embedded views (see here). As it turns out outside of their world view, a lot of users still use basic auth, especially those who don’t expose their systems to the internet and/or auth viz LDAP through Apache

Just my app alone has over 5,000 users that were affected by this decision of theirs. Try telling all these users ‘but this is the right thing to do’ - judging by the comments in that issue list, these sort of changes affect many more users.

So anyway, crosswalk was great while it lasted, and imho, necessary.

We are still using Crosswalk. Check this out: https://developer.android.com/about/dashboards/index.html

It’s supposed Ionic > 2 supports Android >= 4.4 but we alredy tested in 4.4 and it doesn’t work as expected. It works, but “buggy” (screen flickerings, issues with some components, slow animations, etc). On the other hand, you will be missing 6.6% of users with Android >= 4.1 <= 4.3. And a significant 14.5% of users having a bad user experience.

We are planning to remove this component next year in all our apps (in June maybe), when we think the amount of those groups will be reduced enough, but not now. Think about it.