@react-qml/breakpad
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

ReactQML Breakpad

Breakpad Integration for QML and React QML applications

Installation

# install native component
qpm install com.react-qml.breakpad
# (optional) install corresponding package for react-qml application
yarn add @react-qml/breakpad

The package is provided as a qpm package, com.react-qml.breakpad.
Check their GitHub - Usage for App Developers to learn more about qpm.

API

This package exposes a QML singleton RQCrashHandler with the following methods:

export type RQCrashHandlerOptions = {
  productName?: string;
  companyName?: string;
  submitURL: string;
  uploadToServer: boolean;
  extra?: object;
};

export interface RQCrashHandlerType {
  init(options: RQCrashHandlerOptions): void;
  addExtraParameter(key: string, value: string): void;
  addExtraParameter(key: string, value: object): void;
  removeExtraParameter(key: string): void;
  getParameters(): object;
  getLastCrashReport(): string;
  hasPendingUpload(): boolean;
  sendCrashReport(crashId: string): void;
  getSubmitURL(): string;
  getProductName(): string;
  getCompanyName(): string;
  getUploadToServer(): boolean;
  crash(): void;
}

Examples

Usage in ReactQML

import CrashHandler from '@react-qml/breakpad';
CrashHandler.init({
  productName: 'Ben',
  companyName: 'Podzim',
  submitURL:
    'https://sentry.io/api/xxxxxxx/minidump/?sentry_key=xxxxx',
  extra: {
    sentry: {
      release: '0.0.1',
      environment: process.env.NODE_ENV || 'development',
      debug: process.env.NODE_ENV !== 'production',
      tags: {
        git_branch: 'develop',
      },
    },
  },
})

Usage in QML

import ReactQML 1.0

Item {
  Component.onCompleted: {
    RQCrashHandler.init({
      // options
    })
  }
}

License

ReactQML Breakpad is available under LGPLv3.

Readme

Keywords

none

Package Sidebar

Install

npm i @react-qml/breakpad

Weekly Downloads

2

Version

0.1.4

License

MIT

Unpacked Size

10.8 kB

Total Files

5

Last publish

Collaborators

  • longseespace