Scirra / Construct-feature-requests

A place to submit feature requests and suggestions for Construct.
https://www.construct.net
11 stars 1 forks source link

Switching from Cordova to Capacitor #382

Open therealPaulPlay opened 1 month ago

therealPaulPlay commented 1 month ago

Reviewed guidelines

Checked for duplicate suggestions

Summary

Capacitor is an open-source wrapper that builds on the Cordova core, but uses far more up-2-date APIs, has better support for most native APIs without plugins needed and is backwards compatible with Cordova plugins. Moreover, it brings some performance improvements as well.

Possible workarounds or alternatives

Cordova has been pretty outdated for some time now, basically since (a few years before actually) Adobe dropped PhoneGap. Sure, there is a somewhat active community that maintains it, but Capacitor is a far more modern and production-ready alternative.

Proposed solution

Capacitor ships with official plugins that handle anything from haptics to notifications. It also supports PWAs and achieves most of what Construct developers have to do with Cordova plugins out of the box.

Why is this idea important?

I feel like Cordova is getting more and more outdated and a lot of plugins are not keeping up well with recent changes iOS and Android or are very slow to adapt.

Additional remarks

No response

therealPaulPlay commented 1 month ago

...it's also worth pointing out that Cordova still hasn't fixed a big amount of bugs that affect games and apps on iOS and Android, while Capacitor is far more production-ready as it's being used commercially by many corporations

AshleyScirra commented 1 month ago

This would likely be months of highly complex work, and I am doubtful that things will actually be much better after the change. For example you say it brings performance improvements - but isn't it just using the same webview? So won't performance be the same?

therealPaulPlay commented 1 month ago

In regards to rendering performance, likely so. However, I've seen significantly faster app loading times (likely since far less 3rd-party plugins need to be loaded) as well as better stability. I also like the simpler folder structure. However, it seems that the app size with capacitor is bigger. I can't completely say whether the switch is worth it for Construct, but it's safe to say that Cordova is a less than ideal solution to mobile ports.

I can definitely see that it would not be an easy task to migrate from one framework to another, with the build servers and everything, but it might be easier than you think, as Capacitor, in many ways, works in very similar ways as compared to Cordova, you can check out the migration guide here.