Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS BlazorWebView entire view blank #426

Open
kngsly opened this issue Oct 23, 2021 · 2 comments
Open

iOS BlazorWebView entire view blank #426

kngsly opened this issue Oct 23, 2021 · 2 comments

Comments

@kngsly
Copy link

kngsly commented Oct 23, 2021

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 #319 (comment)

@aherrick
Copy link

aherrick commented Jan 6, 2022

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

https://github.com/aherrick/HybridMessageApp

@kngsly
Copy link
Author

kngsly commented Jan 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants