如何创建.dSYM文件? [英] How is a .dSYM file created?

查看:103
本文介绍了如何创建.dSYM文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与另一位开发人员合作开发一款应用,他们只是向他们的计算机上构建的应用商店提交了一个版本。为了在我的机器上构建(属于同一个git commit),我必须改变我们在XCode项目中使用的库之一的路径。我对XCode项目文件所做的任何更改是否会更改dSYM?如果我能够在不修改XCode项目文件的情况下进行构建,那么dSYM文件是否相同?

I'm working on an app with another developer and they just submitted a release to the app store that was built on their computer. In order to make a build on my machine (that belongs to the same git commit), I have to alter the path to one of the libraries we use in my XCode project. Will any changes I make to the XCode project file change the dSYM? If I was able to make a build without modifying the XCode project file, would the dSYM file be the same?

推荐答案

一个dSYM file是调试符号文件。在项目的构建设置中启用Strip Debug Symbols设置时会生成它。

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

启用此设置后,将删除对象的符号名称由此产生的编译二进制文件(尝试和防止的许多对策之一将是黑客/破解者对代码进行逆向工程,以及二进制大小的其他优化等)。

When this setting is enabled, symbol names of your objects are removed from the resulting compiled binary (one of the many countermeasures to try and prevent would be hackers/crackers from reverse engineering your code, amongst other optimisations for binary size, etc.).

dSYM文件可能会在每次编译应用程序时更改(可能每次都由于日期戳),并且与项目设置无关。

dSYM files will likely change each time your app is compiled (probably every single time due to date stamping), and have nothing to do with the project settings.

它们是用于重新表示崩溃报告。使用剥离的二进制文件,如果没有首先重新符号化,您将无法读取任何崩溃报告。如果没有dSYM,崩溃报告将只显示对象和方法的内存地址。 Xcode使用dSYM将符号放回到崩溃报告中,并允许您正确读取它。

They are useful for re-symbolicating your crash reports. With a stripped binary, you won't be able to read any crash reports without first re-symbolicating them. Without the dSYM the crash report will just show memory addresses of objects and methods. Xcode uses the dSYM to put the symbols back into the crash report and allow you to read it properly.

理想情况下,不应在git仓库中跟踪您的dSYM文件。就像在建筑物上改变的其他二进制文件一样,将它们保存在源代码控制中也没有用。但是,说到这一点,重要的是保持每个分布式构建(测试版,新闻稿,应用程序商店发行版等)的dSYM文件安全,以便您能够表示您可能获得的任何崩溃报告。当您使用存档选项时,Xcode会自动为您执行此操作。创建的存档包含您的应用程序及其dSYM,并存储在Xcode的派生数据目录中。

Ideally, your dSYM file shouldn't be tracked in your git repo. Like other binaries that change on building, it's not useful to keep them in source control. However, having that said, it is important that you keep the dSYM files for each distributed build (betas, press releases, app store distributions, etc.) somewhere safe so that you are able to symbolicate any crash reports you might get. Xcode does this automatically for you when you use the Archive option. The created archive contains your app and its dSYM and is stored within Xcode's derived data directory.

这篇关于如何创建.dSYM文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆