Mono interpreter #1438
Labels
doc-idea
Indicates issues that are suggestions for new topics [org]
Pri1
High priority, do before Pri2 and Pri3
📌 seQUESTered
Identifies that an issue has been imported into Quest.
Many of the iOS-specific issues encountered in .NET MAUI are down to use of unsupported aspects of generics due to AOT compilation. In these circumstances, the Mono interpreter should be enabled (
<UseInterpreter>true</UseInterpreter>
). A benefit of this is reduction in overall IPA size.The Mono interpreter is safe to enable for production apps. However, there are some drawbacks:
Use of the interpreter doesn’t have to be an all or nothing proposition. You can enable the interpreter on a more granular per-assembly basis using the
MtouchInterpreter
property. This enables you to:For example, in the app .csproj you can use an additive approach to AOT compile everything except for a specific third-party component for iOS release builds:
The value is a comma-separated list of assemblies to interpret (if prefixed with a minus sign, the assemblies will be AOT-compiled instead), and ‘all’ can be used to specify all assemblies.
This means that you can either start with interpreting everything and then selecting which assemblies to AOT compile, or the opposite: AOT everything, and then select which assemblies to interpret:
See also: dotnet/maui#13019
Associated WorkItem - 92650
The text was updated successfully, but these errors were encountered: