Crashlytics

Contents

API for interacting with the Crashlytics kit.

https://www.npmjs.com/package/cordova-fabric-plugin

Ionic Answers插件的安装(Installation)

ionic cordova plugin add cordova-fabric-plugin npm install @ionic-native/fabric

Ionic Answers插件支持的平台(Supported Platforms)

  • Android
  • iOS

Ionic Answers插件的用法(Usage)

import { Crashlytics } from '@ionic-native/fabric';


constructor(private crashlytics: Crashlytics) { }

...

try {
 await this.loadData();
} catch (e) {
 this.crashlytics.addLog("Error while loading data");
 this.crashlytics.sendNonFatalCrash(e.message || e);
}