Good afternoon.
We are developing a mobile application for iOS on MAUI (.net 9-0). When using the Apple development profile, our application is assembled and deployed on the device without any problems (using the IDE Rider).
But when we change the Apple profile from development to distribution, build the ipa, upload it to TestFlight - on the same device, our application crashes at the start.
In both cases, the same code is used, the same build settings are used:
<PropertyGroup Condition=" '$(Configuration)' == 'Distribution' ">
<MtouchUseLlvm>true</MtouchUseLlvm>
<MtouchEnableBitcode>false</MtouchEnableBitcode>
<AotAssemblies>true</AotAssemblies>
<MtouchLink>SdkOnly</MtouchLink>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<DebugSymbols>false</DebugSymbols>
<CodesignKey>Apple Distribution: company-name (team-id)</CodesignKey>
<WarningLevel>9</WarningLevel>
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
</PropertyGroup>
After examining the crash log generated by TestFlight, we were able to obtain the following trace stack, which led to the forced termination of the application:
System_Private_Xml_System_Xml_XmlAsyncCheckReader_MoveToNextAttribute (in app-bundle-name.iOS) + 68
System_Private_Xml_System_Xml_Schema_FacetsChecker_FacetsCompiler_CompileMinLengthFacet_System_Xml_Schema_XmlSchemaFacet (inapp-bundle-name.iOS) + 136
System_Private_Xml_System_Xml_Serialization_XmlCustomFormatter__cctor (in app-bundle-name.iOS) + 20
System_Private_Xml_System_Xml_XmlParserContext_get_Encoding (in app-bundle-name.iOS) + 16
System_Private_Xml_System_Xml_Serialization_XmlSerializer_CreateReader (in app-bundle-name.iOS) + 36
System_Private_Xml_System_Xml_Schema_XmlBaseConverter_DateOffsetToString_System_DateTimeOffset (in app-bundle-name.iOS) + 56
It looks as if something went wrong during the AOT compilation process, and the code generated based on XAML markup does not work correctly.
If anyone has any ideas on how to solve this problem - crash at the start of the application - I will be very grateful if you share them, because, to be honest, I have no ideas how to solve it
Thanks in advance for any reply