Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change uuid in dsym file

I've been trying to change uuid of generated dsym file so that crashlytics can match up crash logs with the dsym.

Do you know of any way to do it?

For more context:

  • Script uploading the dsym during build failed and I did not notice.
  • Bitcode is disabled, therefore there isn't dsym file in itunes connect.
  • I am able to build project from exactly the same source code, so symbolicating crash log from the dsym should work
  • I am still trying to get crash logs from crashlytics but their UI doesn't support it therefore I reached out to their support and then I should be able to symbolicate it locally.
like image 872
sammy-sc Avatar asked May 29 '17 07:05

sammy-sc


People also ask

Where is the dSYM file located?

Your app's dSYM files are stored in Xcode's dSYM archive path folder. This is the folder where the iOS agent gets the dSYM files that are used to symbolicate your crash reports.

What is a dSYM file?

A dSYM file is an ELF file that contains DWARF (debugging with attributed record formats) debug information for your application. DWARF is a debugging file format that supports source-level debugging.

What is dSYM file Crashlytics?

By default, Firebase Crashlytics automatically processes your debug symbol (dSYM) files to give you deobfuscated and human-readable crash reports. This behavior is set when you add a run script that initializes Crashlytics to your app's build phase.


2 Answers

If you have exact same source code and compiler version, you can build it again and replace new uuid.

To achieve this run dwarfdump -u <yourapp>.dSYM to view new uuid. Then open <yourapp>.dSYM/Contents/Resources/DWARF/<yourapp> with hex editor, locate new uuid and replace with one you needed.

like image 115
Kirill Korsakov Avatar answered Oct 22 '22 10:10

Kirill Korsakov


Steps to change UUID of a dSYM:

  1. Install a MachO viewer/editor. I used this one: https://sourceforge.net/projects/machoview/
  2. Use your MachO editor to open the DWARF file located in the dSYM: XXX.dSYM/Contents/Resources/DWARF/<BINARY_NAME>
  3. In the MachO editor, find 'Load Commands -> LC_UUID' then edit the existing UUID to the one you need to match Crashlytics. (see screenshot)
  4. Make sure you save the change.
  5. Use dwarfdump -u XXX.dSYM to verify the UUID has been changed successfully.

MachOEditorEditUUID

like image 1
Shane Qi Avatar answered Oct 22 '22 09:10

Shane Qi