How to decode a Crash log using dSYM file in iOS?

Viewed 18068

My iOS application crashed. I would like to read the crash log with the dSYM file. How is it possible?

3 Answers

Inspiration

https://developer.apple.com/library/archive/technotes/tn2151/_index.html#//apple_ref/doc/uid/DTS40008184-CH1-SYMBOLICATEWITHXCODE

Steps to get a dsym file

  • Build the iOS app for Archive
  • Extract the MyApp.xcarchive
  • Inside that file, you will find your dSYM file.

Get your device crash log

Pull the .crash file off a device. I normally use xCode for this.

Line-by-line method

atos -arch arm64 -o TheElements.app.dSYM/Contents/Resources/DWARF/TheElements -l 0x1000e4000 0x00000001000effdc

0x1000e4000 = address of your app's image
0x00000001000effdc = is the stripped name of the symbol you want to turn into a readable name

Pro method

Get the location of symbolicatecrash executable.

In xCode 9, the file you want is here:

/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash

Print symbolicated crash log to terminal

export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"

./symbolicatecrash -v crash_log_20_9_2018.crash myapp.app.dSYM

Reading

Nice instructions for atos here: How to symbolicate crash log Xcode?

Way to perform the same without the dsym file here: https://medium.com/@Mrugraj/crash-re-symbolication-5c28d3a3a883

Related