@react-qml/breakpad
v0.1.4
Published
Breakpad Integration for QML and ReactQML application
Downloads
7
Readme
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.