Skip to content

Instantly share code, notes, and snippets.

@triztian
Last active June 6, 2020 01:25
Show Gist options
  • Save triztian/61dd3ca9f6fe5f0bffcf59546d9c4cc8 to your computer and use it in GitHub Desktop.
Save triztian/61dd3ca9f6fe5f0bffcf59546d9c4cc8 to your computer and use it in GitHub Desktop.
Symbolication of Bitcode Crash Reports for iOS

When downloading the appDsyms file from the it often does not include symbols for Bitcode archives, you can manually symbolicate the crash report by doing the following:

  1. Obtain the dSYM files for your AppStore App Archive (*.xcarchive).
    In Organizer under Archives click Download dSYMs... for the relevant build.

  2. Find the UUID that matches the architecture reported in the crash. Run this command against the actual binary/framework you want to symbolicate:

    xcrun dwarfdump --uuid /path/to/MyApp.xcarchive/Products/Applications/MyApp.app/MyApp
    

    An alternative way of doing it is to use otool and look for the uuid string (with the appropriate arch):

    otool -arch arm64 -l '/path/to/MyApp.xcarchive/Products/Applications/MyApp.app/MyApp' | grep uuid
    

    Look for:

    Load command 9
        cmd LC_UUID
    cmdsize 24
        uuid D73721E6-F521-36C8-ABFF-AAE15EEDD60D
    
  3. Convert the UUID string to lowercase and remove -:

    echo $uuid | tr -d '-' | tr '[A-F]' '[a-f]'
    # Output: d73721e6f52136c8abffaae15eedd60d
    
  4. Open your *.crash in a text editor and look for:

    Binary Images:
        0x100058000 - 0x10036ffff MyApp arm64  <8c84e74d19b1313ca77ff8cef337beb9> /var/mobile/Containers/Bundle/Application/10513186-CB5C-4896-AEE9-61436934C882/MyApp.app/MyApp
    
  5. Change 8c84e74d19b1313ca77ff8cef337beb9 to the value from before, i.e., d73721e6f52136c8abffaae15eedd60d and save the file

  6. Run symbolicatecrash on it. It should work, you can find it by running the following, it's usually the first result:

    find $(xcode-select -p) -name 'symbolicatecrash'
    

Useful Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment