xcode iOS 中发布版本的正确“条带调试符号”设置是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29705691/
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 07:01:39  来源:igfitidea点击:

What is the proper "Strip Debug Symbols" settings in iOS for release versions?

iosxcodedebuggingdebug-symbols

提问by kamziro

I've been getting a bunch of crash logs for my (largely c++) app on iOS. My problem is I can't seem to ever symbolicate these crash reports properly.

我在 iOS 上为我的(主要是 c++)应用程序获取了一堆崩溃日志。我的问题是我似乎无法正确地象征这些崩溃报告。

What is the "proper" setting for stripping debug symbols for release on iOS? I get that you'd want to strip the debug symbols so the download size of the app isn't ridiculously large.

剥离调试符号以在 iOS 上发布的“正确”设置是什么?我知道您想要去除调试符号,这样应用程序的下载大小就不会大得离谱。

But the problem is that it seems to make the crash reports virtually unreadable.

但问题是它似乎使崩溃报告几乎不可读。

Do dSYM files on the xcode archives get sent and eventually downloaded by the users?

xcode 档案中的 dSYM 文件是否会被用户发送并最终下载?

Or is it simply something to be kept for future symbolicating purposes (done locally on my own machine, on xcode)?

或者它只是为了将来的符号目的而保留的东西(在我自己的机器上本地完成,在 xcode 上)?

回答by Jason Y

Or is it simply something to be kept for future symbolicating purposes (done locally on my own machine, on Xcode)?

或者它只是为了将来的符号目的而保留的东西(在我自己的机器上本地完成,在 Xcode 上)?

This. Your "release" config (or whichever config you use for distribution) should have the following setting:

这个。您的“发布”配置(或您用于分发的任何配置)应具有以下设置:

Symbols Hidden by Default: Yes

默认隐藏的符号:是

Xcode will still generate a dSYM folder which is what you will use for symbolicating crash logs. There are 3 ways to handle symbolicating:

Xcode 仍会生成一个 dSYM 文件夹,您将使用它来符号化崩溃日志。有 3 种处理符号化的方法:

  1. Use Xcode. For this you need to use the Product -> Archive feature whenever you release. Once an archive is created, you can select "Export" then "Save for iOS App Store Deployment". After this you can drag crash logs into the left side of the "Device Logs" window and Xcode will symbolicate them for you.

  2. Manually symbolicate using the symbolicatecrash tool located inside your Xcode.app folder. This is useful if you've released code to users but don't have an Xcode archive. You need to be sure that the crash log matches the binary and dSYM or it will not work.

  3. Use a third party tool that collects crash reports and symbolicates them for you. Examples include Crashlytics, Bugsense, or HockeyApp.

  1. 使用 Xcode。为此,无论何时发布,您都需要使用产品 -> 存档功能。创建存档后,您可以选择“导出”,然后选择“保存用于 iOS App Store 部署”。在此之后,您可以将崩溃日志拖到“设备日志”窗口的左侧,Xcode 将为您符号化它们。

  2. 使用位于 Xcode.app 文件夹中的 Symbolatecrash 工具手动符号化。如果您已向用户发布代码但没有 Xcode 存档,这将非常有用。您需要确保崩溃日志与二进制文件和 dSYM 匹配,否则它将无法工作。

  3. 使用第三方工具收集崩溃报告并为您进行符号化。示例包括 Crashlytics、Bugsense 或 HockeyApp。