Maui
Maui copied to clipboard
[BUG] TouchEffect does not work on iOS when app is built in Release
Is there an existing issue for this?
- [X] I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- [X] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
TouchEffect does not work on iOS when app is built in Release.
This is a regression in 9.1.0 and possibly due to AOT improvements.
Expected Behavior
TouchEffect should work and fire events/execute commands when attached to a view.
Steps To Reproduce
- Create a new blank MAUI project
- Add a
TouchEffectto any control - Build the app in
Releaseconfiguration
Link to public reproduction project repository
Environment
- .NET MAUI CommunityToolkit: 9.1.0
- OS: iOS 17.5
- .NET MAUI: 8.0.91 SR9.1 (latest)
Anything else?
Works in 9.0.3. Android works in both Debug and Release.
Hi @velocitysystems. We have added the "needs reproduction" label to this issue, which indicates that we cannot take further action. This issue will be closed automatically in 5 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
@brminnick Added reproduction project. I also get a persistent startup crash when debugging on iOS (Android is unaffected):
System.TypeLoadException: Could not set up parent class, due to: Invalid generic instantiation assembly:/Users/dev/Library/Developer/CoreSimulator/Devices/F766998B-9560-4192-90C8-DEC128E8E6D9/data/Containers/Bundle/Application/C4DE1219-9F4A-4D31-9354-A887F27BD4BF/AotSample.app/Microsoft.Maui.dll type:ViewHandler`2 member:(null)
at CommunityToolkit.Maui.AppBuilderExtensions.<>c.<UseMauiCommunityToolkit>b__0_0(IMauiHandlersCollection h)
at Microsoft.Maui.Hosting.HandlerMauiAppBuilderExtensions.HandlerRegistration.AddRegistration(IMauiHandlersCollection builder)
at Microsoft.Maui.Hosting.Internal.MauiHandlersFactory.CreateHandlerCollection(IEnumerable`1 registrationActions)
at Microsoft.Maui.Hosting.Internal.MauiHandlersFactory..ctor(IEnumerable`1 registrationActions)
at Microsoft.Maui.Hosting.HandlerMauiAppBuilderExtensions.<>c.<ConfigureMauiHandlers>b__1_0(IServiceProvider sp)
I've tried the following steps mentioned here with no luck:
- Update .NET 8 SDK to latest
- Update MAUI workloads via
dotnet workload update - Drop bin and obj
- Clear local NuGet package cache
Rolling back to 9.0.3 everything works fine.
We don't accept a zip file as a reproduction sample due to potential security reasons. That said I believe this issue might be solved in PR #2243
same issue here. haven't tried downgrading yet, but this really needs fixing... edit: it does indeed work again when downgrading to 9.0.3
does anyone know if version 10 has a fix for this issue? I haven't been able to try it yet
It's still dos not been fixed yet i courrenty have this problem with version 12 on core 9 with all updates. Is thear any workaround existing?