xcode “复制期间剥离调试符号”和“剥离链接产品”

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

"Strip Debug Symbols During Copy" and "Strip Linked Product"

xcodexcode4

提问by Rodrigo

I read a lot of thing and discovery this configs have 2 side effect:

我读了很多东西,发现这个配置有两个副作用:

  • Make the binary size smaller
  • The program show a better debug crash
  • 使二进制大小更小
  • 程序显示更好的调试崩溃

I am building program for iOS, so I want my binary to be the smallest possible. This mean:

我正在为 iOS 构建程序,所以我希望我的二进制文件尽可能小。这个意思:

  • If I set YESto both config, my binary will be the smaller
  • If I set NO, I will get better debug crash
  • 如果我将两个配置都设置为YES,我的二进制文件将更小
  • 如果我设置NO,我会得到更好的调试崩溃

So I have to set YES for AppStore version and NO for Debug?

所以我必须为 AppStore 版本设置 YES,为 Debug 设置 NO?

回答by Thomas Bartelmess

You are correct, set it to YES for AppStore build and NO for debugging builds. Even when you build you AppStore version, there is dsym file containing all symbols you need to symbolicate your crash logs.

你是对的,将它设置为 YES 为 AppStore 构建和 NO 调试构建。即使在构建 AppStore 版本时,也有 dsym 文件包含符号化崩溃日志所需的所有符号。

回答by Banker Mittal

A dSYM file is nothing a "debug symbols file". It is generated when the "Strip Debug Symbols" setting is enabled in the build settings of your project.

dSYM 文件不是“调试符号文件”。它是在项目的构建设置中启用“条带调试符号”设置时生成的。

The default debug info format for the Debug configuration for new iOS projects is "DWARF with dSYM file", but for new OS X projects is just "DWARF".

新 iOS 项目的调试配置的默认调试信息格式是“DWARF with dSYM 文件”,但新的 OS X 项目只是“DWARF”。

If you're running under the debugger, of course, it will just stop at the point of the crash, so you don't need to symbolicate a crash report.So set 'DWARF' when application is in development and set 'DWARF with dSYM' at the time of release.

当然,如果您在调试器下运行,它只会在崩溃点停止,因此您不需要符号化崩溃报告。因此,在开发应用程序时设置 'DWARF' 并设置 'DWARF with dSYM' 在发布时。

You should apply this settings as well:

您也应该应用此设置:

enter image description here

在此处输入图片说明