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

[Solution] MudBlazor not working with MAUI Blazor on iOS #6558

Open
ScarletKuro opened this issue Mar 30, 2023 · 5 comments
Open

[Solution] MudBlazor not working with MAUI Blazor on iOS #6558

ScarletKuro opened this issue Mar 30, 2023 · 5 comments
Labels
has workaround Has reasonable workaround not a bug safari

Comments

@ScarletKuro
Copy link
Member

ScarletKuro commented Mar 30, 2023

If you are using .NET MAUI Blazor together with MudBlazor and target iOS you might run into a problem #6310
Currently, the AOT compiler runs into issue. This is a known problem dotnet/maui#14271

The only available workaround is to set these options:

<PropertyGroup>
   <MtouchLink>None</MtouchLink>
   <UseInterpreter>True</UseInterpreter> 
</PropertyGroup>

This will stay open and pinned until AOT gets improved or Microsoft makes these options as default dotnet/maui#13019

@ScarletKuro ScarletKuro added enhancement New feature or request triage and removed enhancement New feature or request triage labels Mar 30, 2023
@henon henon pinned this issue Mar 30, 2023
@ScarletKuro ScarletKuro changed the title [Solution] MudBlazor not working with .NET MAUI Blazor when published on iOS [Solution] MudBlazor not working with .NET MAUI Blazor on iOS Mar 30, 2023
@ScarletKuro ScarletKuro changed the title [Solution] MudBlazor not working with .NET MAUI Blazor on iOS [Solution] MudBlazor not working with MAUI Blazor on iOS Mar 30, 2023
@henon henon added has workaround Has reasonable workaround not a bug labels Mar 30, 2023
@theofanis
Copy link

Hey @ScarletKuro!

dotnet/maui#14271 is closed for quite some time now and I never had issues with MudBlazor on either iOS or MacCatalyst. Do you still consider this an issue and does the suggestion still apply?

For what is worth, I have tested with and without the interpreter and also use SdkOnly for linking and I don't have issues with MudBlazor during compilation.

Thanks!

@ScarletKuro
Copy link
Member Author

Hi

Do you still consider this an issue and does the suggestion still apply?

Yes. There was report that FrozenSet is not working on iOS in Release builds, and we are affected too, because we use it in ParameterState on .NET8 in latest versions, and it requires interpreter to be enabled.
Or it would require to add the System.Collections.Immutable to exclusion:

<PropertyGroup>
	<MtouchInterpreter>-all,System.Collections.Immutable</MtouchInterpreter>
</PropertyGroup>

But for me it's easier to explain to the user to just enable the interpreter globally, rather than investigate every case.
To me the MAUI is still far from being ready for production.

@theofanis
Copy link

Cool thanks for verifying.

Yes. There was report that FrozenSet is not working on iOS in Release builds, and we are affected too, because we use it in ParameterState on .NET8 in latest versions, and it requires interpreter to be enabled. Or it would require to add the System.Collections.Immutable to exclusion:

<PropertyGroup>
	<MtouchInterpreter>-all,System.Collections.Immutable</MtouchInterpreter>
</PropertyGroup>

I am aware of this issue, got hit by it yesterday and it took me a few hours to find it. Sounds like you're talking about the same thing. There was an issue logged in the maui board as well, but it was closed a few days ago in favor of the CommunityToolkit one.

Actually, I already use the exclusion you shared to at least try to safeguard some of performance since my app is doing several encoding/hashing actions and still see MudBlazor working OK for what I do, so I thought to ask here.

But for me it's easier to explain to the user to just enable the interpreter globally, rather than investigate every case. To me the MAUI is still far from being ready for production.

I will be monitoring the issue in any case, thank you for the prompt reply!

@ivanpovazan
Copy link

The problem with FrozenSet seems to be fixed in .NET9 and the workaround for enabling the interpreter is not needed anymore. Could you try the latest .NET9 preview release to verify if it fixed the problem for you?

@ivanpovazan
Copy link

I have opened dotnet/runtime#101427 for tracking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has workaround Has reasonable workaround not a bug safari
Projects
None yet
Development

No branches or pull requests

5 participants