BickelLukas / Blazor.Cordova

MIT License
19 stars 2 forks source link

New Blazor version #2

Open Kim-SSi opened 4 years ago

Kim-SSi commented 4 years ago

Could you consider updating this project to a newer version of Blazor? I have tried but the app didn't run after getting to the index page. It seemed as if the javascript was not executing. There were a number of breaking changes in Preview 9.

Regards, Kim

BickelLukas commented 4 years ago

You can have a go at it. I'm happy to accept a PR

rogierhofboer commented 4 years ago

I took a different approach.

If added this to the platforms/android/app/build.gradle:

android {
   aaptOptions {
        ignoreAssetsPattern "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
}

Now you can keep the _framework and _bin paths as is.

Still I can't get the default project to work for the full 100%. I am using the new client side Blazor template.

The app doesn't load Index.razor but shows "Sorry, there's nothing at this address." from App.razor

Fetching the Weatherforecast (when serving from a machine with HTTPS and allowing CORS) does not work. Maybe due to the override of the fetch function.

Selecting Reload makes the app crash with net:ERR_FILE_NOT_FOUND (file://android/asset/www/fetchdata). So it seems routing is not supported well.

But the counter button works :)

rogierhofboer commented 4 years ago

Server side Blazor works if you follow the intstructions below, but then it's just hosting a regular webapp in Cordova and there is no client side mono and WASM involved at all. https://docs.microsoft.com/en-us/visualstudio/cross-platform/tools-for-cordova/tips-workarounds/run-web-app-in-cordova?view=toolsforcordova-2017

drannex42 commented 4 years ago

Did you ever figure out how to get this to fully work @rogierhofboer?