docs-maui
docs-maui copied to clipboard
Managed static registrar for macios
To support NativeAOT a new registrar is available in .NET 8. This new registrar is typically faster than the existing static registrar, particularly when calling an exported managed method from Objective-C, but the exact performance characteristics will vary between apps.
The new registrar can be enabled for device builds:
<PropertyGroup>
<Registrar Condition="!$(RuntimeIdentifier.Contains('simulator'))">managed-static</Registrar>
</PropertyGroup>
The managed static registrar is the only registrar available when using NativeAOT (and will be selected by default in that case).
More info: https://github.com/xamarin/xamarin-macios/blob/main/docs/managed-static-registrar.md