Xcode Bitcode,包括符号设置对 dSYM 生成的影响

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39843221/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 09:23:12  来源:igfitidea点击:

Xcode Bitcode, Include Symbols settings effect on dSYM generation

iosiphoneswiftxcodecrashlytics

提问by allaire

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 :

由于我使用 Crashlytics 来处理我的崩溃,因此在将我的应用程序提交到 iTunes 之前,我总是取消选中“为您的应用程序包含应用程序符号以从 Apple 接收符号崩溃日志”并保持选中“包含位码”(Apple Watch 的未来证明)像这样连接:

Settings

设置

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

Crashlytics 有一篇关于 Bitcode 和缺失 dSYM 问题的文章:

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

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:

根据他们的截图,要下载Bitcode创建的新生成的dSYM文件,iTunes Connect中有一个直接可用的下载链接,但是,您似乎必须选中“包含应用程序符号”才能下载它们,否则您简单地得到这个:

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.

因此,对于 Crashlytics 或任何 3rd 方崩溃处理程序服务的良好运行,这两个设置是如何需要的,我有点困惑。

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)?

我应该同时检查这两个设置吗?是否可以取消选中“包含应用程序符号”,因为我不使用 Apple 的崩溃管理器(据我了解,dSYM 文件在其后脚本存档期间上传到 Crashlytics)并且只选中 Bitcode,否则我不会这样做无法下载新的 Bitcode 生成的 dSYM(导致 Crashlytics 出现问题并正确象征崩溃)?

回答by Mattie

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
  • 向 Apple 提交应用程序时,请务必选中“包含符号”框
  • 始终剥离您的最终可执行文件(.app、.framework)
  • 永远不要剥离你的静态库,如果你有的话
  • 您希望 Apple 的崩溃报告起作用,即使您不打算查看它

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 criticalyou 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.

使用此配置,本地或 Apple 生成的 dSYM 将包含 Crashlytics 和 Apple 报告器工作所需的调试信息。这是至关重要的,你使用位码在与苹果共享的符号。如果不这样做,很可能您将永远无法看到该应用程序版本的象征性崩溃。

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.

当然,您可能不想与 Apple 共享符号是有一些正当理由的。一是你想混淆你的代码。我知道有一些应用程序可以做到这一点。当然,这是一种权衡,因为它使符号化变得更加困难,甚至不可能,这取决于混淆系统。

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.

您可能不想剥离可执行文件也有一些原因。一是您依赖不支持服务器端符号化的第 3 方崩溃报告系统。据我所知,这种情况越来越少见,但需要注意。

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.

最后,您肯定希望 Apple 的崩溃报告系统能够工作,即使您从未打算使用它。Apple 的系统能够比任何第三方解决方案更可靠地捕获更多崩溃。我相信这对 Apple 的内部工作也是无价的。它确实有局限性,但实际上不会花费您任何费用。因此,如果没有其他原因,可以选择在将来查看它,请保持它正常工作。