MobileBlazorBindings
MobileBlazorBindings copied to clipboard
iOS BlazorWebView entire view blank
I ran into this problem and tried the suggestions about 24hrs ago, and still have no idea what caused.
My solution:
- Create a separate MBB project with the same name as the existing MBB project (when the seperate app is working, you can merge back into your solution without compatibility issues)
- Test blank/template app
- If the default works, slowly implement each aspect of your existing (broken) project
- Test after doing any change, make a good effort to identify what breaks and what works
- I implemented like this
wwwroot -> index.html -> mainlayout/globals -> classes/extensions -> helpers -> pages -> app properties/manifest
- By the time I got to implementing pages, I knew the issue isn't page specific or has been solved.
Remember to test as much as possible and across debug/release, it's a lot easier to debug on a blank slate rather than back tracking code changes.
Originally posted by @kngsly in https://github.com/dotnet/MobileBlazorBindings/issues/319#issuecomment-950136347
Here's a standalone sample showing Blank pages. @kngsly were you able to find a solution to this?
https://github.com/aherrick/HybridMessageApp
Here's a standalone sample showing Blank pages. @kngsly were you able to find a solution to this?
G'day!
I wasn't able to identify exactly what the cause was, however I have recently noticed that modifying iOS/Android index.html and wwwroot static content can cause this to occur. I still believe my solution above is best practice, as debugging a broken MBB solution can take many hours.
In general; you want to avoid debugging with [BlazorWebView + Xamarin] projects since there is very little documentation overlap between the two, my current solution includes a Blazor Web Assembly (WASM) for regular development, the only downside to this is Xamarin does not support browsers. I highly recommend keeping a clean code base, and if you are making a lot of big changes, create backups and test regularly.