Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Bitcode, Include Symbols settings effect on dSYM generation

Since I use Crashlytics to handle my crashes, I always uncheck the “Include app symbols for your application to receive symbolicated crash logs from Apple” and keep the "Include Bitcode" one checked (future proof for Apple Watch) before submitting my app to iTunes Connect like this :

Settings

Crashlytics has an article about issue with Bitcode and missing dSYMs :

https://docs.fabric.io/apple/crashlytics/missing-dsyms.html#bitcode-download

According to their screenshot, to download the new generated dSYM file created by Bitcode, there is a download link available directly in iTunes Connect, BUT, it seems that you must have checked "Include app symbols" to be able to download them, otherwise you simply get this:

No

So I'm a bit confused on how these two settings are required for the well-functioning of Crashlytics or any 3rd party crashes handler service.

Should I keep both settings checked? Is it OK to uncheck "Include app Symbols" since I don't use Apple's Crash organizer (from my understanding, dSYM files are uploaded to Crashlytics during their post-script archive) and only keep Bitcode checked or if I do that I won't be able to download new Bitcode generated dSYMs (causing problems to Crashlytics symbolize crashes correctly)?

like image 667
allaire Avatar asked Oct 04 '16 02:10

allaire


1 Answers

This is a good question. There are numerous knobs that affect the availability of debug symbol information for your app. It's confusing, and people are constantly tripped up by it.

Here are my guidelines:

  • always check the "include symbols" box when submitting apps to Apple
  • always strip your final executables (.app, .framework)
  • never strip your static libraries, if you have any
  • you want Apple's crash reporting to work, even if you don't plan to look at it

With this configuration, your dSYMs, produced locally or by Apple, will contain the debug information necessary for both Crashlytics and Apple's reporter to work. It is critical you share symbols with Apple when using bitcode. If you do not, it is likely you will never be able to see symbolicated crashes for that version of your app.

There are, of course, some valid reasons why you might not want to share symbols with Apple. One is you want to obfuscate your code. I'm aware of a few apps that do this. Of course, this is a trade-off, because it makes symbolication much harder, or even impossible, depending on the obfuscation system.

There are also reasons why you might not want to strip your executables. One is that you rely on a 3rd party crash reporting system that does not support server-side symbolication. This is less and less common, as far as I know, but it is something to be aware of.

Finally, you definitely do want Apple's crash reporting system to work, even if you never plan on using it. Apple's system is able to capture more crashes more reliably than any 3rd-party solution could. I'm sure it is also invaluable for Apple's internal work. It definitely does have limitations, but really doesn't cost you anything. So, keep it working, if for no other reason than to have the option to look at it in the future.

like image 88
Mattie Avatar answered Nov 05 '22 12:11

Mattie