#10 - Fix Crashlytics missing dSYM
I was facing the following problem: AppStore with the latest production build and crashlytics without the corresponding dSYM file needed to symbolicate the crashes.
What to do?
After some investigation, this is what I got from a freshly build dSYM:
-
LC_UUID
loads at the beginning of the binary file, with the command1B
. - Even if the architecture is litte endian, the UUID are written as big endian. This is a specification of the UUID:
[...]
/* put name space ID in network byte order so it hashes the same
no matter what endian machine we're on */
[...]
So:
-
Go back to the deploy commit, make sure the build system will re-generate the app at the same status.
-
Archive again, with fastlane’s gym or with a xcarchive
$ bin/gym # <- (I'm using bundler)
-
Get the current UUIDs
$ dwarfdump -u /path/to/MyApp.DSYM UUID: EBD9418E-20FF-44C1-8D3F-D7E75CC6F0B1 (armv7) MyApp.dSYM/Contents/Resources/DWARF/MyApp UUID: D9936E8B-139E-4F63-A063-7863EEFF6B99 (arm64) MyApp.dSYM/Contents/Resources/DWARF/MyApp
-
Change the UUIDs of the binary file with a hex editor.
We are looking for the LC_UUID load command1B000000
and we know that the command size is a 24 bytes long (or 0x18000000). What is following those bytes is our actual UUID.
Or1B000000 18000000 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
, where XXXXXXXX are the bytes you may want change with the correct UUID. -
Save, submit, start bugfixing.