Blazor MAUI blank screen on iOS

Joined
Mar 11, 2023
Messages
9
Programming Experience
10+
I have a Blazor Hybrid MAUI App that works great on Android. However, when I compile my code (both from VS and from dotnet publish in Azure Pipeline) to iOS the app just shows my splash screen and then shows a blank white screen (both on Simulator and on physical iPhone) and nothing more happens.

I tried creating a Hello World / Empty project from the VS templates and that works to deploy, it shows the app correctly. Which makes me think the problem is somehow with my app but I just can't figure out what it is and I don't get any information from the simulator what could be wrong while debugging.

Would really appreciate some guidance/help of what could be wrong and what I am missing. Like mentioned, the code works perfect to compile to Android and there it loads without any problem. I don't see a big difference from my app and the Hello World app more than the fact that I am having a RCR as a reference.

Appreciate any help!

Thank you
 
Feel free to give us some code so we can reproduce it

Perhaps also start with your working hello world and add more bits until it breaks
 
Thank you for the reply @cjard, really appreciate it! I can't share any code because it's all company software and high cohesion with the rest of the code. And the Hello World application which actually works is just to create a new Blazor Hybrid from templates.

I have been working on this all weekend without any results and right now completely stuck. The app works in Debug mode when I deploy it to the simulator, all fine there. But when I publish it (dotnet publish-f:net7.0-ios -c:Release -o:$(build.artifactstagingdirectory) /p:ArchiveOnBuild=true /p:BuildIpa=true) in the Azure DevOps Pipeline it compiles an .ipa which shows me my splash screen and then just blank white screen.

I've read on some github issues people had similar issues and solved it with turning off/on the Linker (some --linkskip, Blazor Hybrid app crashing on physical iOS device, but nowhere else · Issue #9533 · dotnet/maui) for the RCR but I've tried that as well and no difference.

I don't know how to log any events on a compiled .ipa so my next steps will be to do HTTP POST request for each line in MauiProgram.cs and try and see if its possible to see if it crashes there somehow (and HTTP POST the Exception Message) to my server.

Suggestions, ideas and things to try really appreciated.
 
What happens when you build it in Release mode and try to run in the simulator?
 
I think I finally managed to get this working.

I am not entirely sure what was the problem but I think it was when I removed the service worker registration and manifest from the index.html. After that at least the app loaded and crashed (before it was just blank screen). Then I had to set <UseInterpreter>True</UseInterpreter> in my csproj to get it actually running. Now it seems to work fine!
 
Back
Top Bottom