CommonJS module using yy.logcatcher to let the user report run-time errors.
Crash reports via Testflight and other services are nice, but don't give you all the information this script collects for you:
- A description of the steps to reproduce by the reporter.
- The JavaScript/Native error just like you'd get them in the console, including backtrace, file, line and message.
- All relevant
Ti.App
properties. - All relevant
Ti.Platform
properties. - All relevant
Ti.Platform.displayCaps
properties. - A screenshot taken when the error occured.
In my experience asking the tester for the exact steps for me to reproduce the error help a lot to find and resolve the bug.
- Install the yy.logcatcher module.
- Drop the script in your
Resources
orapp/lib
folder. - Add
require('reporter');
to yourResources/app.js
orapp/alloy.js
file.
You might want to use reporter only when you distribute ad-hoc or to a store:
if (Ti.Platform.deployType === 'production') {
require('reporter');
}
reporter = require('reporter');
reporter.recipients = 'mail@fokkezb.nl'; // or an array
reporter.alert_title = 'Error'; // or 'reporter_alert_title' in 'strings.xml'
reporter.alert_message = 'Please let me prepare a report for you to send to the developers.'; // or 'reporter_alert_message' in 'strings.xml'
reporter.alert_no = 'No'; // or 'reporter_alert_no' in 'strings.xml'
reporter.alert_yes = 'Yes'; // or 'reporter_alert_yes' in 'strings.xml'
reporter.alert_describe = 'Please describe what steps led to the error so the developers can reproduce the error'; // or 'reporter_email_describe' in 'strings.xml'