BS
BleepingSwift
Published on
3 min read

> Symbolicating Swift Crash Reports in Xcode

Authors
  • avatar
    Name
    Mick MacCallum
    Twitter
    @0x7fs

When your app crashes in production, the crash logs you receive from App Store Connect or Xcode Cloud are often unsymbolicated, making them difficult to read and debug. Instead of seeing function names like MyViewController.viewDidLoad(), you'll see cryptic memory addresses like 0x0000000101234567. Symbolication converts these addresses back to human-readable function names and line numbers using the .dSYM file that was generated when your app was built.

When Automatic Symbolication Fails

Xcode automatically attempts to symbolicate crash logs when you view them in the Organizer, but this only works if you have the crash log from a local build with the corresponding .dSYM file available. When automatic symbolication fails, you'll see "Symbolication failed" or stack traces filled with memory addresses instead of function names. That's when you need to manually symbolicate using Xcode's symbolicatecrash tool.

The Manual Symbolication Process

First, you'll need to grab your crash log. In Xcode, go to Window → Organizer and select the Crashes tab. Find the unsymbolicated crash you want to analyze, right-click on it, and select Show Package Contents. Inside, you'll find the .crash file.

Next, you need the .dSYM file that corresponds to the build that crashed. If you're using Xcode Cloud, go to Window → Organizer → Archives, find the matching build, right-click and select Show Package Contents, then navigate to the dSYMs folder. For local builds, look in ~/Library/Developer/Xcode/DerivedData/[Project]/Build/Products/Release-iphoneos/.

Before running the symbolication tool, set your DEVELOPER_DIR environment variable:

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

Now you can run the symbolicatecrash tool:

/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash \
    path/to/your/crash.crash \
    path/to/your/app.dSYM \
    > symbolicated_crash.txt

Here's what a complete example looks like:

# Set the developer directory
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/

# Run symbolication
/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash \
    ~/Downloads/MyApp_2025-06-21_Device.crash \
    ~/Downloads/MyApp.app.dSYM \
    > symbolicated_crash.txt

The difference in output is dramatic. Before symbolication, you'll see something like this:

Thread 0 Crashed:
0   MyApp                           0x0000000101234567 0x101000000 + 1234567
1   MyApp                           0x0000000101234568 0x101000000 + 1234568

After symbolication, those addresses become meaningful:

Thread 0 Crashed:
0   MyApp                           0x0000000101234567 MyViewController.viewDidLoad() + 123
1   MyApp                           0x0000000101234568 UIViewController.loadView() + 456

When Things Go Wrong

If you can't find your .dSYM file, check whether you've enabled dSYM generation in your build settings. Look for "Debug Information Format" and make sure it's set to "DWARF with dSYM File". For Xcode Cloud builds, you can download the build artifacts which include the dSYM files.

When the symbolication tool fails, double-check that your file paths are correct and that you have read access to both files. The most common issue is using a dSYM file that doesn't match the exact build that crashed. The dSYM must correspond precisely to the binary that produced the crash log.

Using Crash Reporting Services

Most crash reporting services like Firebase Crashlytics, Bugsnag, or Sentry can handle symbolication automatically if you upload your dSYM files. Firebase Crashlytics uses a build phase script, Bugsnag offers dashboard and API uploads, and Sentry provides a CLI tool. These services save you the manual work and integrate symbolication into your development workflow.

You can also use other command-line tools for symbolication. The atos tool converts addresses to symbols, and dwarfdump extracts debug information from dSYM files. These are handy for quick lookups or scripting your own symbolication workflow.

Manual symbolication is essential when you're debugging production crashes that Xcode can't automatically resolve. Once you know the process, you can quickly transform unreadable crash logs into actionable debugging information.

subscribe.sh

// Stay Updated

Get notified when I publish new tutorials on Swift, SwiftUI, and iOS development. No spam, unsubscribe anytime.

>

By subscribing, you agree to our Privacy Policy.