Tuesday, February 14, 2012

how to find the app version from the iOS crash reports

If you have an app that has a longer history, with several versions of the app having been released along its lifetime, you may find yourself getting a crash report from an end user and not knowing for sure to which potential version of the app it corresponds.

This is a pretty glaring oversight from Apple, because they don't include any information about the bundle version of the app in the crash reports they produce. You'll often see a "Version:         ??? (???)" string that's pretty useless in determining the actual version of the app that produced the crash.

Luckily other people did come up with a solution for this. I'm writing this mostly as a note for myself, after spending more than an hour trying to dig up this info. Hopefully this blog post will help funnel other searches towards the solution.

The key to solving the problem is to use the dwarfdump command line tool to determine the UDID of the app, for different versions of the app that you published, and look up those UDID in the crash report, until you find a match.

So for each version of the app you have in your "Archives" view of the Xcode organizer,


you'd try to find the actual binary of the app. You may need to use the "Show Package Contents" option of the Finder several times to dig down through archives, towards the binary file.


Then you'd drag that binary over a Terminal window, to complete the call to dwarfdump, and you'd make a note of the UDIDs that are output by the tool:


Then you'd simply look up those UDIDs in the crash report, while ignoring the dashes in the format of UDIDs that are produced by dwarfdump but are not present in the crash report:


 If you get a match, like I do here for the armv7 architecture, it means that the version of the app you have selected in the Organizer corresponds to the crash report being analyzed.

No comments: