How to find your bug from iOS Crash Logs

Sometimes tracking down bugs can be a big pain. Often I am in a position where I simply cannot for the life of me duplicate a bug that a user is seeing on their system. When this occurs, you can help figure out the cause of their nasty bugs by having them pull the crash log off of their machine and symbolicating it to find where in your code the error is coming from. This process isn’t exactly straight forward, so here is a nice little guide on how to do it.


1. Sync your device with your computer through iTunes

2. Now you can pull the crash logs off of your computer. The directory they are stored in depends on your operating system.

~/Library/Logs/CrashReporter/MobileDevice/[device name]

Windows XP
C:\Documents and Settings\Application Data\Apple computer\Logs\CrashReporter\[device name]

Windows Vista
C:\Users\AppData\Roaming\Apple computer\Logs\CrashReporter\MobileDevice\[device name]

Your log files will be named:
Crash File Naming: [App_Name]_[Crash Date]_[Device Name].crash

3. Open the crash file and find the memory location of the crash. This may take a bit of figuring out, but in general, you will see something that says Exception Type… ect and then a line that says Triggered by Thread: [X]. You need to scroll down to that thread in the report below it. Then on that specific thread, look for the closest line to your top that shows the name of your app on the left side. In the next column, you’ll see something like “0x00109772”. This is the memory address to note for later.

4. Locate your .app file by opening Xcode and find the archive for the current version of your application. Right click on it and press Show in Finder. Then right click on that archive and click Show Package Contents.

5. Find the dSym file by going inside the dSYMs Folder, the right click on the dSYM and press Show Package Contents. Go into Package/Resources/DWARF. Your dSYM file is here named after your app. Copy it to your Desktop.

6. Now open up a terminal go to your desktop with cd ~/Desktop and run the command “xcrun atos -arch armv7 -o MyApp 0x0000000" where 0x00000000 is the memory address you noted in step 3, AppName is replaced with the name of your app package and armv7 may be replaced with a specific architecture you have built your app for. Doing this should result in a class name and a line number. This should help you to figure out the cause of your crash.




This site uses Akismet to reduce spam. Learn how your comment data is processed.