Skip to main content

AppCenter Adapter

Send captured errors to Microsoft AppCenter. This adapter is primarily for React Native / mobile apps.

Install

yarn add appcenter-crashes appcenter-analytics

Both packages are required.

Activate

import { initialize, useAdapter } from 'unified-error-handling';

initialize();

await useAdapter('appcenter', {
appSecret: 'your-app-secret',
});

Config

FieldPurpose
appSecretYour AppCenter app secret (required).

The adapter dynamically imports appcenter-crashes and appcenter-analytics and forwards captured errors as crashes/events.

Notes

  • If either package is missing, activation throws Failed to load AppCenter SDK… with the original import error preserved as cause, plus a reminder that AppCenter targets React Native / mobile.
  • For pure web apps, prefer another adapter (Sentry, Datadog, Bugsnag, Rollbar, Raygun, LogRocket) — the AppCenter SDKs are built for native mobile runtimes.