Locating Crash Reports

[iPhone developer:tips];

If an applications crashs while running on a device, iOS logs the errors and creates a crash report. The report includes specifics about the OS version, date/time, the exception type, a stack trace, among other details.

Below is a partial listing of a report:
 

Crash Reports in Xcode and Organizer

If you are in the midst of writing an application that has crashed on a development device, you can view crash reports from within Xcode Organizer:

- Open Organizer
- Select the Devices option (on the top of the screen)
- Select the device on menu (left side of the screen)
- Choose Device Logs

Notice the list includes all the apps that have crashed on the device, not only the applications that you’ve written.

Crash Reports and the App store

For applications that a user has installed from the App Store, crash logs will be uploaded to Apple and you can download using iTunes Connect. For example, if you have an application that is available on the App Store and a user has notified you that the app crashed, you can access the crash report:

- Log into the iOS Dev Center
- From the menu in the upper right, choose iTunes Connect
- Select Manage Your Applications
- Click on the application you are interested for which you want to see the reports
- Select the View Details option below if application icon
- Select the Crash Reports link

Crash Reports with Ad Hoc and Enterprise Apps

When a device is synchronized with iTunes, crash reports are copied from the device onto the system running iTunes. To have a user get a copy of the crash report to you, they will need to locate the report(s) from the local system and make the report available to you (email, etc).

The location of the report is dependent on the OS:

Mac OS X: ~/Library/Logs/CrashReporter/MobileDevice/<DEVICE_NAME>

Windows XP: C:Documents and Settings<USERNAME>Application DataApple ComputerLogsCrashReporterMobileDevice<DEVICE_NAME>

Windows Vista or 7: C:Users<USERNAME>AppDataRoamingApple ComputerLogsCrashReporterMobileDevice<DEVICE_NAME>

<DEVICE_NAME> is the name set for the device (go to Settings – General – About)
<USERNAME> is the name used when logging into the computer.

Crash Report Files

The files of the most help are those that end in .crash files. The crash report’s filename begins with the application name and contains date/time information. In addition, <DEVICE_NAME> will appear at the end of the file name, before the extension.

When locating crash log files, the files are written with the following format:

appName_date_deviceName.crash

For example: iPhoneApp_2011-07-25-094420_MyiPhone.crash

Sent with Reeder

-------

Doron Katz