Eilon / MauiHybridWebView

MIT License
203 stars 41 forks source link

HybridWebView not only access local SPA's but on the internet too! #16

Open danilobreda opened 1 year ago

danilobreda commented 1 year ago

From: https://github.com/dotnet/maui/discussions/12009#discussioncomment-4939364

My use case is a SPA application in Vue (Static SPA) that we made hybrid for desktop(browser) and mobile. This application is deployed on a simple public web server http://example.com/spa/index.html

We saw that it is very interesting because the end user can have the update automatically without having to update the app (just refreshing the webview).

It's similar to your React example but it's hosted on the web.

The need to have the interaction between C# and Javascript is necessary for "Native Menu" calling the spa menu when clicked, downloading files and other nice functions.

We already have an example of this in production with an app made in reactnative, but we want to migrate to MAUI and add more functionality to the app

I made a version that works with a fork from your project and some modifications. So its possible :)

Eilon commented 1 year ago

That looks very cool! I'll keep this issue open in case it's something to consider for this project.

zhang178007 commented 11 months ago

When developing an app, it often requires interaction between the backend server, web server, and app client, which can accelerate the development process. Therefore, I believe it is necessary to load the web on the network. This way, in the future, certain content can be updated without app updates when certain requirements change

ryanshirley-flipdish commented 8 months ago

Being able to specify a URL instead of local files would be a big bonus for me. This would not only allow for deploying UI changes without publishing a new app build but for a developer experience you could then get hot-reload for the UI when debugging on device.

I know I that I will get hot-reload in the browser but I won't be able to call into MAUI this way.

memogarrido commented 2 months ago

Maybe something like this:

https://github.com/Eilon/MauiHybridWebView/compare/main...memogarrido:MauiHybridWebView:poc/remote-url