crosswalk-project / crosswalk-ios

Crosswalk Project for iOS
https://crosswalk-project.org/
BSD 3-Clause "New" or "Revised" License
117 stars 77 forks source link

Support for all Cordova plugins #73

Open lucatorella opened 8 years ago

lucatorella commented 8 years ago

I'm considering Crosswalk, and I'm wondering why only few Cordova plugins are supported. Is there any technical reason why Crosswalk can't support all Cordova plugins? It seems to me that theoretically it can support any plugin and it's just a matter of integration tools missing. Am I right?

baleboy commented 8 years ago

At the moment Crosswalk for iOS is not integrated with the Cordova infrastructure. Crosswalk has its own extension mechanism, supported on all platforms including iOS, and as a convenience we provide a bridge between Crosswalk extensions and Cordova plugins. However not all the features available to Cordova plugins work when running as a Crosswalk extension, and that's why not all plugins are supported. We don't plan to spend any effort in trying to make additional plugins to work.

If Cordova plugins are required, an alternative way is to use the WkWebView webview plugin implemented by the Cordova project. This is not that different than using Crosswalk for iOS, because on iOS we are restricted by the App Store terms to use the WebKit web engine that comes with the platform. I haven't tried the plugin myself, but given that it's maintained by the Cordova project, I assume that it supports all existing plugins. We actually started to implement a crosswalk-cordova iOS webview plugin ourselves, but it didn't really add much value compared to the WkWebview plugin and so we abandoned that effort.

@jondong anything to add?

lucatorella commented 8 years ago

Thanks for your answer, so it's not a real technical issue. From what I understand the problem is how the cordova add plugin CLI works and the problem of integrating with their CDVViewController and their structure in general that is quite rigid.

To clarify I'm already using Cordova + WKWebView plugin, I just want to add support for crosswalk plugins too.

baleboy commented 8 years ago

I just want to add support for crosswalk plugins too.

Could you clarify what you mean by that? Are you trying to use some Crosswalk extensions (i.e. APIs) in your app? Which ones?

lucatorella commented 8 years ago

It's quite a complicated project, but to sum up, imagine a container native app that runs custom js code. And you can add any plugin coming from both Cordova and Crosswalk and use them in the js without ever seeing the Xcode project. (so adding/removing plugins will be a completely automated process)