简体   繁体   English

对于发行版,iOS中正确的“ Strip Debug Symbols”设置是什么?

[英]What is the proper “Strip Debug Symbols” settings in iOS for release versions?

I've been getting a bunch of crash logs for my (largely c++) app on iOS. 我在iOS上的(主要是C ++)应用程序中收到了大量崩溃日志。 My problem is I can't seem to ever symbolicate these crash reports properly. 我的问题是我似乎无法正确象征这些崩溃报告。

What is the "proper" setting for stripping debug symbols for release on iOS? 用于剥离调试符号以在iOS上发布的“正确”设置是什么? I get that you'd want to strip the debug symbols so the download size of the app isn't ridiculously large. 我知道您想剥离调试符号,以使应用程序的下载大小不会过大。

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上本地完成)?

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. Xcode仍将生成一个dSYM文件夹,该文件夹将用于象征崩溃日志。 There are 3 ways to handle symbolicating: 有三种处理符号的方法:

  1. Use Xcode. 使用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". 创建存档后,您可以选择“导出”,然后选择“保存以进行iOS App Store部署”。 After this you can drag crash logs into the left side of the "Device Logs" window and Xcode will symbolicate them for you. 之后,您可以将崩溃日志拖到“设备日志”窗口的左侧,Xcode会为您符号化它们。

  2. Manually symbolicate using the symbolicatecrash tool located inside your Xcode.app folder. 使用Xcode.app文件夹中的symbolicatecrash工具手动进行符号化。 This is useful if you've released code to users but don't have an Xcode archive. 如果您已将代码发布给用户但没有Xcode存档,这将非常有用。 You need to be sure that the crash log matches the binary and dSYM or it will not work. 您需要确保崩溃日志与二进制和dSYM匹配,否则它将不起作用。

  3. Use a third party tool that collects crash reports and symbolicates them for you. 使用第三方工具收集崩溃报告并为您符号化它们。 Examples include Crashlytics, Bugsense, or HockeyApp. 示例包括Crashlytics,Bugsense或HockeyApp。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM