780 questions
NativeAOT is part of the Maui build, and not Xcode. NativeAOT, places several limitations on your coding. Your code has broken one of these limitations. See:
https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/?tabs=net7%2Cwindows