.NET MAUI: The construct is failing in iOS platform attributable to App Middle libraries

.NET MAUI: The construct is failing in iOS platform attributable to App Middle libraries


I’ve applied AppCenter for crash analytics in my .NET MAUI utility. It’s working superb on the Android platform, however I’m dealing with a difficulty on the iOS platform. When I attempt to create a construct, it fails, and I’m unable to run the venture from Visible Studio Code to the simulator.

For the implementation, I’ve added the next NuGet packages:

  • Microsoft.AppCenter.Analytics (Model="5.0.6")
  • Microsoft.AppCenter.Crashes (Model="5.0.6")

Implementation particulars:

In AppDelegate.cs file:

public override bool FinishedLaunching(UIApplication utility, NSDictionary launchOptions)
    {
        attempt
        {
            AppCenter.Begin("AppSecret",
               typeof(Analytics), typeof(Crashes));
            return base.FinishedLaunching(utility, launchOptions);
        }
        catch (Exception exception)
        {
            Utility.SendCrashReport(exception);
            return false;
        }
    }

In Utility Class:

public static void SendCrashReport(Exception exception)
    {
        attempt
        {
            Crashes.TrackError(exception);
        }
        catch (Exception ex)
        {
            SendCrashReport(ex);
        }
        
    }

When I attempt to construct the venture for iOS, the construct fails with the next errors:

/usr/native/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_18.0/18.0.8319/targets/Xamarin.Shared.Sdk.targets(1648,3): error : clang++ exited with code 1: [/Users/Desktop/project name/project name/project name.csproj::TargetFramework=net8.0-ios]

/usr/native/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_18.0/18.0.8319/targets/Xamarin.Shared.Sdk.targets(1648,3): error : ld: constructing for 'iOS-simulator', however linking in object file (/Customers/Desktop/ venture title/venture title/obj/Launch/net8.0-ios/iossimulator-arm64/linker-cache/AppCenter.a[arm64][2](MSACAppCenter.o)) constructed for 'iOS' [/Users/Desktop/project name/project name/project name.csproj::TargetFramework=net8.0-ios]

/usr/native/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_18.0/18.0.8319/targets/Xamarin.Shared.Sdk.targets(1648,3): error : clang++: error: linker command failed with exit code 1 (use -v to see invocation) [/Users/Desktop/project name/project name/project name.csproj::TargetFramework=net8.0-ios]

Moreover, when I attempt to run the venture on the iOS simulator, it launches however solely shows a clean display screen.

Screenshot:

enter image description here

I discovered an identical concern reported on GitHub.

How can I resolve the construct failure on iOS?

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 
rooshohttps://www.roosho.com
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Latest Articles

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog.