CrashReportSender

[EDIT: Discontinued.]

OK, today we’ve got something for you that every single iPhone application developer should implement immediately. It certainly would have saved us being reduced to gibberingly apoplectic frustration last year. At least, you should implement it immediately if you’re not absolutely 100% certain that your app will never crash either because of your own code or because of any change in system libraries’ behaviour. Feel free to stop reading now if that’s the case.

Ah, you’re still here. Yes indeed, even if you yourself do happen to be absolutely perfect, those people who left because they trust Apple are pretty silly, aren’t they now? So let us continue.

The immediate problem we’d been faced with was bug reports like this one:

I observed the app crash during [REDACTED]. This occurred when a button was pressed…  [REDACTED] I believe. But I have tried this additional times and have not observed a crash, so it is not easily repeatable.

Those are great, aren’t they? And of course, the idea of a user being able to follow instructions like “please send me the crash report, which you can find after you next sync at this path…”, well that’s just crazy talk. So we decided that for the sake of our blood pressure, we needed to put in some way to get those crash reports directly. And it seems that state of the art in free code to help you out with that is still the long-ago–mentioned PLCrashReporter … but there’s a new twist to it. An awesome twist. On awesome toast. With a side dish of awesome. And that twist would be the CrashReporterDemo project.

Really, it’s quite sadly misnamed indeed, because it’s not just a reporter demo, it’s a complete crash management and automatic feedback system. “And automatic feedback?” you say? Why, yes, indeed, “and automatic feedback”, we said. Like this. Your app crashes, next time it starts the user gets a screen like this (pardon the greenly redacted bits, but this project is still SOOPER SEEKRIT):

CrashReporterCrashed.png

No particularly big deal so far, if still waaaaaaay better than most apps manage. But this, ah this is the awesome part, the user taps ‘Yes’ and nigh on immediately this shows up:

YeahIKnow.png

Woah. Have you ever seen any application do that before? We have never seen any application do that before. That’s just so insanely awesome that “awesome” blushes and hides itself as not being up to the task of adequately conveying its awesomeness. We do so wish we’d had this last summer as the angry emails poured in and the angry one-star reviews piled up and we begged the grinning gargoyles athwart the Apple approval process to p-p-p-please let us publish a four line fix as they sat back on their evil haunches and cackled hysterically at our discombobulation. Alright, perchance we exaggerate somewhat; it may be that their cackling was not actually hysterical. But it felt that way at the time. Not that we’re bitter or anything, mind you. It was an educational experience that poking around the undocumented corners of the SDK is actually not as clever an idea as it may appear at the time. But we digress.

How this project brings the magic is that it includes online PHP scripts to handle the submission — and local support to symbolicate the crash reports on your own machine and send them back up to the server, how awesome is that indeed — sort it by version, and identify them as being a particular “pattern”. And you can set a fix and a fixed version online to that pattern. Like, for the above, this:

CrashReporterPattern.png

and then on the versions screen — which will fill in the future version you note for a fix automatically — set the type of resolution (fixed, submitted to Apple, now available for upgrade, …) and tell it to notify future submitters;

CrashReporterVersions.png

… and then they will get an appropriate alert as shown above.

So yeah, I trust that now you follow where we were coming from when we said this is something that “every single iPhone application developer should implement immediately“. If not sooner.

But wait! There’s even more! If setting this up on your own server is too much of a strain — although it’s not that hard, really — it’s available as a free service online at macdevcrashreports.com! Or it will be, anyways; at present it’s in limited signup beta testing. Probably worth signing up with once they go commercial, I’m sure. In the meantime, the open source version works just fine. We’d call out “awesome” again, but “awesome” is running and crying from overuse in the post already, so we’ll just reiterate that this is something we’re going to consider mandatory for any future projects we’re actually going to be tasked with supporting after initial release!

Alex | April 2, 2010

Leave a Reply