How to symbolicate crash/error logs from a Xamarin Forms iOS project?

When you build your iOS project, you should have the .app file in the bin/iPhone/Release directory. Or, if you have the .ipa file, you can extract the .app from that with. You can rename the file to have .zip and extract. The .app will be in the Payload folder. On Windows, it can be a little confusing because the icon might look like a Folder or Directory. Check the file extension. On Mac, it should recognize a .app and it might not show the extension at all. Instead, it looks like this:

enter image description here

Important: You need to use the same .app file that generated the crash report. This means you would have to use the .app from the package you installed on the device that generated the crash report. Hopefully, you archived that or saved it somewhere. Simply rebuilding the project to get a new .app will not match up with the .crash file during symbolication and will not work. If you don’t have access to that, you will need to publish again and this time keep the .app around for the next time you get a .crash to analyze.

To manually symbolicate, I have a blog post about doing this here. To summarize, here are the steps:

Create an Alias

Open Terminal and run one of these commands for your version of Xcode:

Xcode 7.X
alias symbolicate="/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash -v"  

This just makes using the symbolicatecrash tool easier by aliasing it to a symbolicate command so we don’t have to navigate to that directory to run the command.

Update the Developer Directory

Run this command:

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

Symbolicate

Open Terminal again and cd to the directory where you placed your files in the step above. Run the symbolicate command we aliased before with your .crash and .app files as the parameters like this:

symbolicate -o "symbolicatedCrash.txt" "MyAppName 2-12-14, 9-44 PM.crash" "MyAppName.app"

This will symbolicate the crash file and spit out the result in a new file named “symbolicatedCrash.txt”. Make sure that correct the file names from my example to match yours.

Leave a Comment