Windows Store apps and Electron apps are inherently separate things. Personally, I see nothing wrong with typical hybrid approaches, and people who obsess over some UI use-case are probably not using their html component libraries correctly. I do wish we had the isolation of separate browser views in the windows version of inappbrowser, there are a multitude of CORS/permission related issues lingering in the fact that we use an iframe from a js based uwp app, but it is a long road to change, you would need to implement a new platform since nothing would be reusable.
@purplecabbage risingj.com On Wed, May 1, 2019 at 2:33 PM Chris Brody <chris.br...@gmail.com> wrote: > I wonder if it would make sense to take a look at how > react-native-windows deals with native C# and C++ views? > > Careful since they seem to be working on a rewire from C# to C++. > > For the future, I wonder if we should consider dropping formal Windows > support in favor of Electron? (And same for "osx" platform?) > > On Wed, May 1, 2019 at 5:12 PM Jan Piotrowski <piotrow...@gmail.com> > wrote: > > > > Thanks for the confirmation what I suspected. > > > > -J > > > > Am Mi., 1. Mai 2019 um 22:39 Uhr schrieb Jesse <purplecabb...@gmail.com > >: > > > > > > Unfortunately, No. C#/C++ Portable Class Library ( PCL ) code cannot > > > render on top of the web component. > > > The libraries that you can use are limited in PCLs and for projects > > > targeting Windows Store it is not possible to render UI. > > > If the entire cordova-windows platform were re-architected to be a C# > or > > > C++ based application, with a native webview container in which to > render, > > > then everything is possible. This is a long risky road though ... > > > everything from the cordova.js and the bridge would have to change, and > > > every plugin would need to be rewritten. > > > > > > Cheers, > > > Jesse > > > > > > @purplecabbage > > > risingj.com > > > > > > > > > On Wed, May 1, 2019 at 1:03 PM Jan Piotrowski <piotrow...@gmail.com> > wrote: > > > > > > > For Cordova iOS and Cordova Android it is possible to create plugins > > > > that create native UI on top of your app - you just include the > > > > libraries in your plugin and execute their API. Example for Android > > > > InAppBrowser: > > > > > https://github.com/apache/cordova-plugin-inappbrowser/blob/a162bd90764e7b3c6a5f8b2f394e7ff71ba166d5/src/android/InAppBrowser.java#L920-L922 > > > > > > > > For Cordova Windows, the native code _is_ HTML and Javascript, hence > > > > the InAppBrowser plugin also adds a standard HTML tag for a Webview > > > > (or even plain Iframe) to get the same effect: > > > > > > > > > https://github.com/apache/cordova-plugin-inappbrowser/blob/master/src/windows/InAppBrowserProxy.js#L177-L182 > > > > > > > > But you can also create plugins for Cordova Windows that use C# or > C++ > > > > native code via a Windows Runtime Component. A public example is the > > > > globalization plugin that uses a `.winmd` file to offer APIs to the > > > > Javascript code > > > > > > > > > https://github.com/apache/cordova-plugin-globalization/tree/master/src/windows/ > > > > (source for that lives in > > > > > > > > > https://github.com/apache/cordova-plugin-globalization/blob/master/src/windows/GlobalizationProxy/GlobalizationProxy/Globalization/GlobalizationImpl.cs > > > > ). > > > > This works great and is pretty awesome. > > > > > > > > Unfortunately all the plugins that I could find use this C#/C++ > native > > > > plugin mechanism only to receive some method call, do something with > > > > the parameters and return some data. None of those open any windows > or > > > > create any other GUI (that might for example be offered by an > external > > > > C# SDK). > > > > > > > > Is it possible to create User Interface with native (C#, C++) plugins > > > > for Cordova Windows? > > > > > > > > Best, > > > > Jan > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org > > > > For additional commands, e-mail: dev-h...@cordova.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org > > For additional commands, e-mail: dev-h...@cordova.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org > For additional commands, e-mail: dev-h...@cordova.apache.org > >