Symbolicating iOS📱 Crash👺 Reports

Nikhil Manapure
The Swift Blog
Published in
3 min readDec 23, 2016
Our favourite Speedy

A thing that scares the developers is a CRASH and what scares them more is NOT being able to re-symbolicate the crash reports and the same happened to me. So here goes how I solved it.

Crash Report

Nightmare

How I found the culprit😈:

1. Get .dSYM file of your app file. .dSYM [Debug Symbol file] files store the debug symbols for your app. That will help convert “0x1000f4000” to something meaningful.

2. For getting .dSYM file of the build that crashed, just go to Xcode > Window menu > Organizer > Right click on the build that made you find this article > Show in finder > Right click on .xcarchive > Show Package contents > Go to dSYMs folder > Copy your .dSYM file and paste in a folder.(😲 Hope this was not too much for you)

3. Now we need your .app file, ohh you have .ipa no worries, just change extension of .ipa to .zip and uncompress it and find your .app file and copy paste to the same folder as your .dSYM file is in.

4. Now get your .crash file if you already have or else attach your device to your mac, go to devices then find your device and then view logs and find our your logs which crashed and then wait…

5. Now the real work begins ⛑, go to your folder which contains .app and .dSYM file and run (by replacing MYAPP with our app name)

$ xcrun atos -o MYAPP.app/MYAPP -arch arm64 -l 0x1000f4000 0x00000001002162c8

6. Just look at how I copied the address, I have reversed the order of address how they had appeared in crash report.

7. This should output something like

specialized AddressBookView.tableView(UITableView, cellForRowAtIndexPath : NSIndexPath) -> UITableViewCell (in MYAPP) (AddressBookView.swift:0)

8. This is how I found my culprit.

Another way (without dSYM) I found to catch the culprit 😈 and even his partners in crime 👻👻👻👻:

Shorter and 😘

  1. Using symbolicatecrash will give entire crash report translated into meaningful terms and here is how to use it

2. Run

$ < symbolicatecrash file path> <.crash file path> <.app file path>

3. <.crash file path> and <.app file path> are okay but where do I find this symbolicatecrash 😖🤔 … so now run

find /Applications/Xcode.app -name symbolicatecrash -type f

4. This will print out the path you need, just copy and use it. (the cmd will take its own sweet time to execute 😴)

5. Running this will return whole crash report in human readable format.

6. 😎Pro tip- add > CrashFileName.crash to your above command and get your readable crash report as .crash file.

Getting DEVELOPER_DIR can’t be found error

Set developer directory by running -

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

Happy Coding and always remember -

The sooner you start coding, the longer it takes.

--

--