Skip to main content

Microsoft App Center

Setup​

You have to set it up for Android and iOS. The official docs are available here.

Crashes​

In your code you have can import the functionality as follows:

import Crashes from 'appcenter-crashes';

To generate a crash and see if you set it up correctly you can either throw a JS exceptions or use Crashes.generateTestCrash().

To check if the app crashed last time the user used it you can use: const didCrash = await Crashes.hasCrashedInLastSession();

And to access that report you can use: const report = await Crashes.lastSessionCrashReport();

Analytics​

In your code you have can import the functionality as follows:

import Analytics from 'appcenter-analytics';

To send events you can use Analytics.trackEvent('name-of-event)'. You can also attach a JSON object to that event like so: Analytics.trackEvent('connection', { Internet: 'WiFi', GPS: 'Off'})