We are trying to build in release the NET Maui Sample and it crashes on physical device while loading the splash screen. We are using net maui 9.0.51/9.0.1 with SDK 9.0.300 on Mac book pro with Xcode 16.4 and iOS SDK 18.5
The device we are deploying to is an iPad running 17.7.8
Originally we were having this problem using abp 8.1.1 with net maui and decided to create a brand new ABP sample project to test and noticed it was also having the same issue. We tried turning UseInterpreter to true and MTouchLink to None without any success. As a comparison, we create another project using Microsoft net maui template and it worked in release with the same provisioning profile.
6 Answer(s)
-
0
When building and deploying an ABP-based .NET MAUI app in Release mode to a physical iOS device, crashes at the splash screen are often related to linker or AOT (Ahead-Of-Time) compilation issues, especially with third-party frameworks like ABP.
The official ABP documentation for MAUI highlights that additional steps may be required for iOS provisioning and deployment. See: https://abp.io/docs/latest/framework/ui/maui/
Key troubleshooting steps:
- Ensure all iOS provisioning profiles and certificates are correctly set up. See the Microsoft guide linked in the ABP docs.
- If you have set
UseInterpreter=true
andMtouchLink=None
without success, try reverting to the default linker settings (SdkOnly
) and only setUseInterpreter=true
for problematic assemblies. - Make sure all referenced libraries (including ABP modules) are compatible with .NET MAUI 9.x and iOS 17+.
- Clean and rebuild the solution, and delete the bin/obj folders.
- If the issue persists, try running the app with a minimal ABP module set to isolate the problematic dependency.
If a plain Microsoft .NET MAUI template works but the ABP sample does not, the issue is likely with ABP module compatibility or linker configuration.
For iOS-specific build and deployment issues, always check the latest ABP and Microsoft MAUI documentation for any breaking changes or required configuration.
Sources:
- https://abp.io/docs/latest/framework/ui/maui/
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
-
0
We have gone through all the suggestions listed above without any success. Our experiment is just the sample project created through abp studio with no additional code added.
-
0
Have you configured requirements for Secure Storage? MAUI app uses secure storage in Release mode to store tokens. Probably it tries to read auth token at the startup.
https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/storage/secure-storage?view=net-maui-9.0&tabs=macios#get-started
That might be the problem, I cannot be sure about it, we need more logs to understand it
-
0
Are you talking about these settings?
"When developing on the iOS simulator, enable the Keychain entitlement and add a keychain access group for the application's bundle identifier.
Create or open the Entitlements.plist in the project and find the Keychain entitlement and enable it. This will automatically add the application's identifier as a group. For more information about editing the Entitlements.plist file, see Entitlements.
In the project properties, under iOS Bundle Signing set the Custom Entitlements to Entitlements.plist."
These are already included in the apb sample project.
Just to be clear, the sample apb.io .net maui base project ONLY works in debug mode when deploying to a device or the simulator. But it does NOT work in release mode. It crashes immediately on load. We didnt add any custom code.
Would you like the project zipped up so you can try and deploy it to a device? You could generate the code and get the exact code that we have. The only difference is the URL for the server we deployed too.
-
0
Note: we are compiling on the mac with VS Code. Is Visual Studio a requirement?
-
0
Given your app crashes only in Release mode on physical iOS devices while functioning properly in Debug mode and simulator, this strongly suggests an issue tied to linker behavior, AOT compilation, or runtime entitlements, especially with regards to ABP's internal use of Secure Storage.
Here are our prioritized suggestions to further isolate and resolve the issue:
- Revisit Linker Configuration Stick with the default linker setting: SdkOnly instead of None, as overly aggressive linker stripping can remove reflection-dependent services that ABP relies on.
If still unstable, try [Preserve] attributes or a linker descriptor (Linker.xml) for critical modules, especially those using reflection or DI-heavy services.
- Verify Entitlements for Secure Storage MAUI apps read from secure storage in Release mode by default. Please ensure:
Entitlements.plist includes Keychain Access Groups.
In iOS Bundle Signing, Custom Entitlements points to your Entitlements.plist.
You’ve tested the SecureStorage sample independently in a Release build to validate your signing and entitlements pipeline.
- Instrument for Logging Set up native crash logs using Xcode’s Devices & Simulators window after the crash.
Integrate a lightweight try-catch log writer for early startup to capture any fault at the MauiProgram.cs or DI registration level.
- Build Environment Check You mentioned using VS Code on macOS — while building MAUI apps for iOS doesn’t strictly require full Visual Studio, the ABP tooling might assume certain project behaviors more aligned with VS for Mac. If possible, try compiling using Visual Studio for Mac to cross-validate.