Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NET8 MAUI & iOS: error with AppCenter Crashes

In my NET8 MAUI application, I added the packages for AppCenter. The application is working for Windows and Android. When I try to run the application on an Apple simulator, the building gets me this error:

clang++ exited with code 1: ld: in /Users/enrico/Library/Caches/Xamarin/mtbs/builds/LanguageInUse/1fa03704bb15e35c6f47a701d9d92131e3e0740198296a93338bb3c829bc9cf7/obj/Debug/net8.0-ios/iossimulator-arm64/linker-cache/AppCenterCrashes.a(MSACErrorReport.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/enrico/Library/Caches/Xamarin/mtbs/builds/LanguageInUse/1fa03704bb15e35c6f47a701d9d92131e3e0740198296a93338bb3c829bc9cf7/obj/Debug/net8.0-ios/iossimulator-arm64/linker-cache/AppCenterCrashes.a' clang: error: linker command failed with exit code 1 (use -v to see invocation) LanguageInUse C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets 1559

I tried different Target iOS Framework but I get the same result.

Do you know if I can fix it? Do I have to remove the AppCenter packages (and this is so annoying)?

like image 372
Enrico Rossini Avatar asked Oct 16 '25 20:10

Enrico Rossini


1 Answers

The underlying issue seems to be that the AppCenter NuGet doesn't support the ARM64 architecture in the simulator. As shared in this MAUI GitHub issue, you have to enter this in your CSPROJ file:

<ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE>
like image 71
Saamer Avatar answered Oct 19 '25 10:10

Saamer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!