Bugsnag.Maui:
Bugsnag.Android:
Bugsnag.iOS:
Binding library for the Bugsnag SDK It consists of a android and ios binding and a cross platform sdk to consume the bindings.
Install the package from nuget
dotnet package add Bugsnag.Maui
dotnet package add Bugsnag.Android
dotnet package add Bugsnag.iOS
or add package reference to your project file
<ItemGroup>
<PackageReference Include="Bugsnag.Maui" Version="<insert version>" />
<PackageReference Include="Bugsnag.Android" Version="<insert version>" />
<PackageReference Include="Bugsnag.iOS" Version="<insert version>" />
</ItemGroup>
the native bindings follow the sdk version that they are bound to
Package | Version | SDK Version |
---|---|---|
Bugsnag.Maui | N/A | |
Bugsnag.Android | 6.17.0 | |
Bugsnag.iOS | 6.32.2 |
using Bugsnag.Maui;
public static class MauiProgram
{
public static MauiApp CreateMauiApp(Action<IServiceCollection>? addServices = null)
{
var builder = MauiApp.CreateBuilder();
builder.UseBugsnag(configure =>
configure
.WithApiKey(BugsnagApiKey)
.WithReleaseStage(ReleaseStage.Local)
.OnSendTransform(BugsnagErrorGrouping.Default)
);
...
}
}
prereques
your android environment must be configured. see dotnet maui getting started
you also must have ANDROID_HOME
configured
- ensure that the .maven-sdk-version is at the correct version
- open the solution
- build
- open project
- build
Note: the rake file does not correctly handle creating the .xcodeproj, in fact, all of the files that are supposed to be automatically copied are committed to the repo. There is going to be a little bit of manual work to bump the ios sdk to a new version. The other option is to finish building the scripts.
We use AndroidRedirectStdToFile to capture Mono's Managed Stacktrace
from native crashes.
// In MainActivity or early startup
AndroidRedirectStdToFile.Start("Bugsnag.Maui");
On the next app launch after a crash, look in <files>/crashes/
for the latest
crash_<epochMs>.txt
and attach it to the Bugsnag report.