Assembla home | Assembla project page
 

Crash Reports

One of the issues a developer faces when working on an embedded platform like the iPhone is how to get crash reports from a user. Without direct access to the device on which the crash occurred, a utility for transmitting a crash report to a developer is needed. After difficulty finding such a solution for iPhone applications, I decided to implement my own.

When a signal like SIGSEGV occurs or and unhandled exception is encountered, MyMote gathers pertinent details and a backtrace into a crash report. The report is logged to stderr, but subsequently is formatted into an e-mail using the mailto: URL protocol. When the UIApplication opens the URL, the application quits and the Mail application is loaded. A new e-mail is created with the To:, Subject:, and body fields filled in with the appropriate information about the crash. The user simply presses send to transmit the report to a developer.

To see the code needed to make this happen, take a look at main.m. Note that the code is licensed under the GPLv2, so don't view it if you cannot incorporate GPLv2 compatible code into your application.