Eilon / MauiHybridWebView

MIT License
217 stars 49 forks source link

Redirect to http://10.0.2.2 at startup #88

Open nine-2-five opened 4 weeks ago

nine-2-five commented 4 weeks ago

Hi,

we're running Svelte SPA app inside HWV, but for easier debugging it would be of great help to us to be able to direct the HWV to a localhost URL, like http://10.0.2.2:5173 which is the case for our Svelte app. 10.0.2.2 is a special URL in Android emulator which stands for localhost on development PC.

I tried: mainHybridWebView.Source = "http://10.0.2.2:5173"; in MainPage.xaml.cs, but after inspecting with chrome://inspect#devices the URL in HWV is still https://0.0.0.0

nine-2-five commented 4 weeks ago

Fixed by redirecting inside Svelte instead of MAUI.