MauiHybridWebView icon indicating copy to clipboard operation
MauiHybridWebView copied to clipboard

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

Open danilobreda opened this issue 2 years ago • 4 comments
trafficstars

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 :)

danilobreda avatar Apr 18 '23 18:04 danilobreda

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

Eilon avatar May 04 '23 21:05 Eilon

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

zhang178007 avatar Aug 15 '23 09:08 zhang178007

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.

ryanshirley-flipdish avatar Dec 01 '23 13:12 ryanshirley-flipdish

Maybe something like this:

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

memogarrido avatar May 27 '24 14:05 memogarrido