Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Looking for an easy way to symbolicate crashes?

Fool'n'Lazy-Proof iOS Crash Symbolication

For some reason, -that is not important now,- you might find yourself looking at a cryptic .crash...

Symbolicating it is as easy as running this Xcode script:

symbolicatecrash -v <.crash file> <.app/app binary> > <.crash output file>

Despite that, I created a script for the fool and lazy (as myself) holding an .ipa, and not wanting to remember where symbolicatecrash is.

Cheers! 💥


Just run this script on a folder with your .ipa, the corresponding .dSYM, and (1+) .crash file/s.

Will output symbolicated sym-*.crashes for you.

# Fool'n'Lazy-Proof iOS .crash Symbolication
# Just run this script on a folder with your `.ipa`, the corresponding `.dSYM`,
# and (1+) `.crash` files. Will output symbolicated `sym-*.crash`es for you.
# Copyright (c) 2016 Ferran Poveda (@fbeeper)
# Provided under MIT License (MIT):
function checkForRequiredFileOfType()
count=`find $1 -print -quit 2> /dev/null | wc -l | awk '{print \$1}'`
if [[ $count > 0 ]]; then
echo "Found a $1 file"
echo "Missing a $1 file! Need *.ipa + *.dSYM + *.crash files."
function checkForRequiredFiles()
checkForRequiredFileOfType "*.ipa"
checkForRequiredFileOfType "*.dSYM"
checkForRequiredFileOfType "*.crash"
# Define location of symbolicatecrash binary (defaults to Xcode 7 location, but can be defined on params)
# Let's make sure you haven't forgotten any file
# Extract .ipa and define where the binary is (assuming it has the same name)
ipa=`find *.ipa -print -quit`
bsdtar -xf "$ipa" -s'|[^/]*/||'
app=`find *.app -print -quit`
# Symbolicate all .crash files
export DEVELOPER_DIR="/Applications/"
for i in *.crash; do
if [[ ! $i == sym* ]]; then # Skips previous output files from this script
"$symbolicatecrash" -v "$i" "$app" > "sym-$i"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment