Hysen Labs
Open-source project
answer-huang/dSYMTools avatar
answer-huang

dSYMTools

GitHub describes it as dSYM analyze. The repository metadata lists C as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.

3,473 stars871 forksCMIT
01
DEEP OPEN-SOURCE ANALYSIS

answer-huang/dSYMTools: 项目简介

GitHub describes it as dSYM analyze. The repository metadata lists C as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.

02
DEEP OPEN-SOURCE ANALYSIS

Repository scope

GitHub describes it as dSYM analyze. The repository metadata lists C as its primary language. The metadata lists the MIT license. The README describes the project this way: 来到新公司后,前段时间就一直在忙,前不久 项目 终于成功发布上线了,最近就在给项目做优化,并排除一些线上软件的 bug,因为项目中使用了友盟统计,所以在友盟给出的错误信息统计中能比较方便的找出客户端异常的信息,可是很多像数组越界却只给出了 -[ NSArrayM objectAtIndex:]: index 50 beyond bounds [0 .. 39]' 这类错误信息,如下图所示:

03
DEEP OPEN-SOURCE ANALYSIS

什么是 dSYM 文件

The README section "什么是 dSYM 文件" states: Xcode编译项目后,我们会看到一个同名的 dSYM 文件,dSYM 是保存 16 进制函数地址映射信息的中转文件,我们调试的 symbols 都会包含在这个文件中,并且每次编译项目的时候都会生成一个新的 dSYM 文件,位于 /Users/ /Library/Developer/Xcode/Archives 目录下,对于每一个发布版本我们都很有必要保存对应的 Archives 文件 ( AUTOMATICALLY SAVE THE DSYM FILES 这篇文章介绍了通过脚本每次编译后都自动保存 dSYM 文件)。

04
DEEP OPEN-SOURCE ANALYSIS

dSYM 文件有什么作用

The README section "dSYM 文件有什么作用" states: 当我们软件 release 模式打包或上线后,不会像我们在 Xcode 中那样直观的看到用崩溃的错误,这个时候我们就需要分析 crash report 文件了,iOS 设备中会有日志文件保存我们每个应用出错的函数内存地址,通过 Xcode 的 Organizer 可以将 iOS 设备中的 DeviceLog 导出成 crash 文件,这个时候我们就可以通过出错的函数地址去查询 dSYM 文件中程序对应的函数名和文件名。大前提是我们需要有软件版本对应的 dSYM 文件,这也是为什么我们很有必要保存每个发布版本的 Archives 文件了。

05
DEEP OPEN-SOURCE ANALYSIS

如何将文件一一对应

The README section "如何将文件一一对应" states: 每一个 xx.app 和 xx.app.dSYM 文件都有对应的 UUID,crash 文件也有自己的 UUID,只要这三个文件的 UUID 一致,我们就可以通过他们解析出正确的错误函数信息了。

06
DEEP OPEN-SOURCE ANALYSIS

Editorial conclusion

The repository README is the source for this review. It does not replace a local installation or an independent test.

07
DEEP OPEN-SOURCE ANALYSIS

Official sources

08
Community notes

Community notes