Troubleshoot Build Errors in an iOS Application
- 2 minutes to read
Follow the instructions in this topic to resolve common errors encountered while building .NET MAUI iOS applications.
Common Compilation Errors
This section explains how to fix common complication errors, including the following two:
- “clang++ exited with code 1”
- “Failed to AOT compile [*.dll], the AOT compiler exited with code 1”
Step 1: Check Project Settings
DevExpress MAUI NuGet packages specify optimal build settings for DevExpress libraries. Errors may arise if you specify conflicting settings at the project level. If any of the following settings are present in your project file, remove them:
- UseInterpreter
- MtouchInterpreter
- TrimMode
- TrimmerRootAssembly
- TrimmableAssembly
When you modify project settings, delete the bin and obj folders before you rebuild the application.
After applying changes, rebuild your application. If the issue persists, proceed to Step 2.
Step 2: Enable Mono Interpreter
If the issue persists after following Step 1, enable the Mono Interpreter.
Refer to the following topic for more information on this option: Enable Trimming to Reduce MAUI App Size
Issue: “error : strip exited with code 139”
This issue may arise when building your app for iOS when using Xcode 16. For more details, see the following ongoing discussion: Regression: error : strip exited with code 139.
This error may occur randomly. For example, you might encounter it during a build. Clean the bin and obj folders, and rebuild the application. The issue may disappear temporarily.
Solution 1: Disable Symbol Stripping
<PropertyGroup>
...
<MtouchNoSymbolStrip Condition="$(TargetFramework.Contains('-ios')) AND '$(Configuration)' == 'Debug'">true</MtouchNoSymbolStrip>
</PropertyGroup>
Note that these settings may significantly increase the size of the final app package. We recommend that you use these settings only in the Debug configuration.
Solution 2: Enable Mono Interpreter
Enable Mono Interpreter.
Refer to the following topic for more information on this option: Enable Trimming to Reduce MAUI App Size.