A decoder for iOS/macOS crash reports generated by PLCrashReporter
npm install plcrashreport-decoder --save
// import
const CrashReport = require('plcrashreport-decoder');
// read crash report file
const fs = require('fs');
let buffer = fs.readFileSync('path/to/crashreport');
// create a CrashReport object. The constructor accepts Buffer, Array ([number]) and ArrayBuffer.
let cr = new CrashReport(buffer);
// get the decoded JSON
let decoded = cr.toJSON();
Please run npm link
before using CLI.
pl-decode example.plcrash -t json
-f
: Format of decoded crash report. Can be default
, string
or json
.
Include the minified JavaScript file in your HTML, and you will be able to use the CrashReport
class.
<script src="dist/crashreport.min.js"></script>
Please see example.html for details.
Run npm run build
to build a minified UMD bundle.
The project is released under MIT license. Please see LICENSE for full terms.