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:
I discovered an identical concern reported on GitHub.
How can I resolve the construct failure on iOS?