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

[BUG] TouchEffect does not work on iOS when app is built in Release #2235

Open
2 tasks done
velocitysystems opened this issue Sep 27, 2024 · 4 comments
Open
2 tasks done
Labels
area/behaviors Issue/Discussion/PR that has to do with Behaviors bug Something isn't working unverified

Comments

@velocitysystems
Copy link

velocitysystems commented Sep 27, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

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

  1. Create a new blank MAUI project
  2. Add a TouchEffect to any control
  3. Build the app in Release configuration

Link to public reproduction project repository

AotSample.zip

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.

Copy link
Contributor

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.

@velocitysystems velocitysystems changed the title [BUG] TouchEffect does not work when app is built in Release [BUG] TouchEffect does not work on iOS when app is built in Release Sep 28, 2024
@velocitysystems
Copy link
Author

@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.

@bijington
Copy link
Contributor

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

@MitchBomcanhao
Copy link

MitchBomcanhao commented Oct 23, 2024

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

@vhugogarcia vhugogarcia added the area/behaviors Issue/Discussion/PR that has to do with Behaviors label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/behaviors Issue/Discussion/PR that has to do with Behaviors bug Something isn't working unverified
Projects
None yet
Development

No branches or pull requests

5 participants