MobileBlazorBindings icon indicating copy to clipboard operation
MobileBlazorBindings copied to clipboard

iOS BlazorWebView entire view blank

Open kngsly opened this issue 3 years ago • 2 comments

I ran into this problem and tried the suggestions about 24hrs ago, and still have no idea what caused.

My solution:

  1. 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)
  2. Test blank/template app
  3. If the default works, slowly implement each aspect of your existing (broken) project
  4. 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

kngsly avatar Oct 23 '21 11:10 kngsly

Here's a standalone sample showing Blank pages. @kngsly were you able to find a solution to this?

https://github.com/aherrick/HybridMessageApp

aherrick avatar Jan 06 '22 00:01 aherrick

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.

kngsly avatar Jan 06 '22 01:01 kngsly