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 Release Builds: Unable to GetActiveEventHandlers due to JIT limitation #186

Closed
nwestfall opened this issue Jul 6, 2023 · 1 comment · Fixed by #187
Closed

iOS Release Builds: Unable to GetActiveEventHandlers due to JIT limitation #186

nwestfall opened this issue Jul 6, 2023 · 1 comment · Fixed by #187

Comments

@nwestfall
Copy link
Contributor

Steps to Reproduce

Build MAUI Blazor App w/ Geoblazor Map
Deploy for Release to iOS (locally or Testflight)
Load Map

What Happens

An exception is thrown

System.ExecutionEngineException: Attempting to JIT compile method '(wrapper dynamic-method) object object:Thunk1ret_Object_CallSite_Boolean_Object (System.Func`2<object[], object>,System.Runtime.CompilerServices.CallSite,bool,object)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.
...
 at dymaptic.GeoBlazor.Core.Components.Views.MapView.GetActiveEventHandlers()
 at dymaptic.GeoBlazor.Core.Components.Views.MapView.<RenderView>b__308_2()
 at Microsoft.Maui.Dispatching.DispatcherExtensions.<>c__DisplayClass3_0.<<DispatchAsync>b__0>d.MoveNext()

In the GetActiveEventHandlers method, a dynamic object is used which is not allowed on iOS with .NET (noted here - https://learn.microsoft.com/en-us/xamarin/ios/internals/limitations#systemreflectionemit). This was the only instance of dynamic I could find in the project.

I have PR incoming shortly to fix this with pattern matching instead, but I wanted to open the issue for tracking.

/cc @anotherlab

@anotherlab
Copy link

This one is a show-stopper for us. We can't generate builds for our QA people to test on iOS.

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

Successfully merging a pull request may close this issue.

2 participants