Issues in running the MAUI app in Macbook

Srilekha Chowdary 60 Reputation points
2024-06-25T05:57:13.5833333+00:00

We created a MAUI app using version .Net8.0. We are trying to debug/run the app by connecting Visual Studio to Mac, but we are encountering issues debugging the app. The pipeline is functioning as expected. Specifically, we're facing an issue with clang++ exiting with code 1, preventing deployment on the simulator.

Debug Configuration

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|iPhoneSimulator'"> <DebugType>full</DebugType> <Optimize>false</Optimize> <ErrorReport>prompt</ErrorReport> <RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier> <WarningLevel>4</WarningLevel>     <CodesignEntitlements>Platforms\iOS\Entitlements.plist</CodesignEntitlements> <ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE> <PlatformTarget>arm64</PlatformTarget> <CodesignKey>iPhone Distribution</CodesignKey> <IPhoneResourcePrefix>Platforms/iOS/Resources</IPhoneResourcePrefix>

</PropertyGroup> 

 

Issue Details

Severity  Code  Description  Project  File  Line  Suppression State Error    clang++ exited with code 1: ld: in /Users/sunil.ganpati.patil/Library/Caches/Xamarin/mtbs/builds/Edata/644f571749696dff332a5d8a11aeaf0707882e7d6ab1f076f5984e4e549fbb26/obj/Debug/net8.0-ios/ios-arm64/linker-cache/AppCenterCrashes.a(MSACErrorReport.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/sunil.ganpati.patil/Library/Caches/Xamarin/mtbs/builds/Test/644f571749696dff332a5d8a11aeaf0707882e7d6ab1f076f5984e4e549fbb26/obj/Debug/net8.0-ios/ios-arm64/linker-cache/AppCenterCrashes.a' clang: error: linker command failed with exit code 1 (use -v to see invocation)  Test 🧪)  C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets  1559  

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,148 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 28,631 Reputation points Microsoft Vendor
    2024-06-25T07:10:33.1666667+00:00

    Hello,

    This error is thrown by AppCenterCrashes SDK, and you are trying to debug your app on a simulator, however this SDK won't forward any crash log if you're attached to the debugger. See App Center Crashes for iOS - Visual Studio App Center | Microsoft Learn

    In addition, AppCenter doesn't ship support for the iossimulator-arm64 architecture, and there is no plan to support the simulator, please do not set the configuration for simulators and run the app on your physical device.

    For more details, please refer to

    Microsoft.AppCenter.Crashes clang++ exited with code 1 when compiling for ios-simulator on pair arm64 mac in VS for Windows · Issue #1755 · microsoft/appcenter-sdk-dotnet (github.com)

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.