I have two related questions actually:
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)?
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?
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.
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.
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/*).
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 .
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With