UNPKG

react-native-firebase-compiled

Version:

A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Sto

104 lines (80 loc) 2.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.statics = exports.default = exports.NAMESPACE = exports.MODULE_NAME = void 0; var _ModuleBase = _interopRequireDefault(require("../../utils/ModuleBase")); var _native = require("../../utils/native"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * * Crash Reporting representation wrapper */ const MODULE_NAME = 'RNFirebaseCrashlytics'; exports.MODULE_NAME = MODULE_NAME; const NAMESPACE = 'crashlytics'; exports.NAMESPACE = NAMESPACE; class Crashlytics extends _ModuleBase.default { constructor(app) { super(app, { moduleName: MODULE_NAME, hasMultiAppSupport: false, hasCustomUrlSupport: false, namespace: NAMESPACE }); } /** * Forces a crash. Useful for testing your application is set up correctly. */ crash() { (0, _native.getNativeModule)(this).crash(); } /** * Logs a message that will appear in any subsequent crash reports. * @param {string} message */ log(message) { (0, _native.getNativeModule)(this).log(message); } /** * Logs a non fatal exception. * @param {string} code * @param {string} message */ recordError(code, message) { (0, _native.getNativeModule)(this).recordError(code, message); } /** * Set a boolean value to show alongside any subsequent crash reports. */ setBoolValue(key, value) { (0, _native.getNativeModule)(this).setBoolValue(key, value); } /** * Set a float value to show alongside any subsequent crash reports. */ setFloatValue(key, value) { (0, _native.getNativeModule)(this).setFloatValue(key, value); } /** * Set an integer value to show alongside any subsequent crash reports. */ setIntValue(key, value) { (0, _native.getNativeModule)(this).setIntValue(key, value); } /** * Set a string value to show alongside any subsequent crash reports. */ setStringValue(key, value) { (0, _native.getNativeModule)(this).setStringValue(key, value); } /** * Set the user ID to show alongside any subsequent crash reports. */ setUserIdentifier(userId) { (0, _native.getNativeModule)(this).setUserIdentifier(userId); } } exports.default = Crashlytics; const statics = {}; exports.statics = statics;