Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I still symbolicate a distribution build that stripped its debug symbols?

I have two related questions actually:

  1. If I want to be able to symbolicate crash logs from a distribution build (that is, a build I gave to someone to beta test my application - not one that is already in the appstore), should I disable the "Strip Linked Product" and "Strip Debug Symbols During Copy" options for debug or for release? In fact, would it cause any kind of problem is I disable both of them forever (even in my appstore submission)?

  2. If I distributed a build to a beta tester, but it had enabled the "Strip Linked Product" and "Strip Debug Symbols During Copy" options, is there still a way to symbolicate their crash logs?

like image 532
Voldemort Avatar asked Nov 29 '13 03:11

Voldemort


People also ask

What is dSYM file in IOS?

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 debug symbols in IOS?

Debug Symbols are additional information about your source code that are used to help debugging. See also this wikipedia article about debug symbols. They will not be submitted to the appstore as they are only part of debug-build while you only submit a release-build to the appstore.

How do you remove binary symbols?

To remove debugging symbols from a binary (which must be an a. out or ELF binary), run strip --strip-debug filename. Wildcards can be used to treat multiple files (use something like strip --strip-debug $LFS/tools/bin/*).

How do I upload dSYM to Sentry?

Use the Fastlane action, download_dsyms, to download the dSYMs from App Store Connect and upload to Sentry. The dSYM won't be generated until after the app is done processing on App Store Connect so this should be run in its own lane. You need to have an auth token for this to work. You can create an auth token here .


2 Answers

When you create an Archive (Build > Archive), the archive bundle will have a folder called dSYMS that contain dSYM file(s) (debug symbols file) for your application and other linked libraries. This means you can strip debug symbols from your products but keep the dSYM files to symbolicate crash reports. This post has more information on how to use the atos tool to symbolicate a crash report provided that you have the app binary and dSYM files.

In general, Debug builds have Strip Debug Symbols During Copy set to NO, and Release builds have it set to YES to reduce the binary size.

like image 183
indragie Avatar answered Oct 14 '22 05:10

indragie


If you have distributed your application through build -> archive, you will have dSYM file associated with it. Now when you get crash report, there is no need to do anything. Drag the crash report into Xcode and it will be automatically get added to you Organizer section. If valid archive and dSYM file is available, Xcode will automatically symbolicate the crash log for you.

like image 31
Apurv Avatar answered Oct 14 '22 06:10

Apurv