dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.87k stars 1.69k forks source link

Allow local files (PWA app) in WebView (CORS) #8380

Open romanov opened 2 years ago

romanov commented 2 years ago

Description

Hello!

I am not sure if it yet possible or is it just a CORS issue (https://github.com/dotnet/maui/issues/7920)

The Problem I would like to wrap my PWA and use native capabilities.

I create a blank new MAUI native app, with 1 WebView. I put my local files into Asset folder and then can load index.html into WebView.

But if want to use external javascript files or libs, i get CORS block (request block from https://0.0.0.0).

Why not MAUI Blazor Blazor is a good example of what i can create with HTML/JS/C#, but what if i want to use different frameworks or create my simple PWA without any overhead.

PWA in Google Store I can publish PWA to Google, but i want to use hybrid app for additional options and i can't publish PWA to IOS (i can, but i need to wrap it again with another toolkits).

Public API Changes

Allow any requests to local files (shiped in assets folder) in WebView.

Intended Use-Case

PWA

Telavian commented 2 years ago

This does make sense. If I package files with my application then it really makes no sense that I am not allowed to load them in my own app browser.

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

fanhai commented 1 year ago

When will it be ready?

mgungorchamp commented 11 months ago

Any update on this? Since webview causes fatal crashes on some websites randomly.
https://github.com/dotnet/maui/issues/16677

Eilon commented 4 months ago

Possibly related: #6410