How to use the react-native-firebase.crashlytics function in react-native-firebase

To help you get started, we’ve selected a few react-native-firebase examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github textileio / photos / App / Services / ErrorHandler.ts View on Github external
StackTrace.fromError(e, { offline: true }).then(frames => {
    // Crashlytics.recordCustomExceptionName(e.message, e.message, frames)
    const updatedFrames = frames.map(row => ({
      lineNumber: row.lineNumber,
      columnNumber: row.columnNumber,
      functionName: row.functionName,
      fileName: `${row.fileName}:${row.lineNumber || 0}:${row.columnNumber ||
        0}`
    }))
    Firebase.crashlytics().recordError(0, e.message)
    // Crashlytics.recordCustomExceptionName(e.message, e.message, updatedFrames)
  })
  if (originalHandler) {
github RSG-Group / RSG-Chess-mobile / App.js View on Github external
if (msg && msg.nativeEvent.data) {
      // Track issues if any
      if (typeof msg.nativeEvent.data === "string") {
        firebase
          .crashlytics()
          .setStringValue("handleMessage_data", msg.nativeEvent.data);
      } else if (!JSON.stringify(msg.nativeEvent.data)) {
        firebase
          .crashlytics()
          .setStringValue("webView_message_type", typeof msg.nativeEvent.data);

        firebase
          .crashlytics()
          .recordError(1, "Cannot stringify message from WebView.");
      } else {
        firebase
          .crashlytics()
          .setStringValue(
            "handleMessage_data",
            JSON.stringify(msg.nativeEvent.data)
          );
      }
      // // //

      msg = JSON.parse(msg.nativeEvent.data);
      const { promoteAI } = this;

      game.moveSelected(
        game.board[msg.from.y][msg.from.x],
        msg.to,
        promoteAI,
        this.handleCheckmate,
github RSG-Group / RSG-Chess-mobile / App.js View on Github external
handleMessage = msg => {
    if (msg && msg.nativeEvent.data) {
      // Track issues if any
      if (typeof msg.nativeEvent.data === "string") {
        firebase
          .crashlytics()
          .setStringValue("handleMessage_data", msg.nativeEvent.data);
      } else if (!JSON.stringify(msg.nativeEvent.data)) {
        firebase
          .crashlytics()
          .setStringValue("webView_message_type", typeof msg.nativeEvent.data);

        firebase
          .crashlytics()
          .recordError(1, "Cannot stringify message from WebView.");
      } else {
        firebase
          .crashlytics()
          .setStringValue(
            "handleMessage_data",
            JSON.stringify(msg.nativeEvent.data)
          );
      }
      // // //

      msg = JSON.parse(msg.nativeEvent.data);
      const { promoteAI } = this;

      game.moveSelected(
github karanpratapsingh / Proximity / app / utils / firebase.ts View on Github external
import firebase from 'react-native-firebase';
import { generateUUID } from './shared';
import { Asset, StoragePaths, Errors } from '../constants';
import { Platform } from 'react-native';

export const storage = firebase.storage();
export const messaging = firebase.messaging();
export const notifications = firebase.notifications();
export const crashlytics = firebase.crashlytics();

export const initializeFCM = async () => {
  try {
    if (Platform.OS === 'android') {
      const channel = new firebase
        .notifications
        .Android
        .Channel('proximity-channel', 'Notification Channel', firebase.notifications.Android.Importance.Max)
        .setDescription('Proximity Notification Channel')
        .setSound('default');

      notifications.android.createChannel(channel);
    }
    const hasPermission = await messaging.hasPermission();
    if (!hasPermission) {
      await messaging.requestPermission();
github pillarwallet / pillarwallet / src / actions / authActions.js View on Github external
import { updateConnectionKeyPairs } from 'actions/connectionKeyPairActions';
import { initOnLoginSmartWalletAccountAction } from 'actions/accountsActions';
import { updatePinAttemptsAction } from 'actions/walletActions';
import { restoreTransactionHistoryAction } from 'actions/historyActions';
import { setFirebaseAnalyticsCollectionEnabled } from 'actions/appSettingsActions';
import { setActiveBlockchainNetworkAction } from 'actions/blockchainNetworkActions';
import SDKWrapper from 'services/api';
import { findEthereumNetwork } from 'utils/networks';
import { setEthereumNetwork } from 'actions/networkActions';

import type { Dispatch, GetState } from 'reducers/rootReducer';

import { saveDbAction } from './dbActions';


const Crashlytics = firebase.crashlytics();

const storage = Storage.getInstance('db');
const chat = new ChatService();

export const loginAction = (
  pin: ?string,
  privateKey: ?string,
  onLoginSuccess: ?Function,
  updateKeychain?: boolean = false,
) => {
  return async (dispatch: Dispatch, getState: GetState, api: SDKWrapper) => {
    let { accounts: { data: accounts } } = getState();
    const {
      featureFlags: { data: { SMART_WALLET_ENABLED: smartWalletFeatureEnabled } },
      connectionKeyPairs: { data: connectionKeyPairs, lastConnectionKeyIndex },
      appSettings: {
github RSG-Group / RSG-Chess-mobile / App.js View on Github external
? game.board[y][x].color !== game.turn[last].color
          : game.board[y][x].color === "W")
      ) {
        this.setState({ selected: game.board[y][x] });
      } else {
        game.board[y][x] &&
          ToastAndroid.show(
            strings.invalidMove[lang],
            ToastAndroid.SHORT,
            ToastAndroid.BOTTOM
          );
      }
    }

    firebase.crashlytics().setStringValue("FEN", game.FEN);
    firebase
      .crashlytics()
      .setIntValue("threefold_length", game.threefold.length);
  };