问题描述
我的应用程序使用了一些第三方框架.我本身有一个框架和dSYM文件.
My app uses some 3rd party framework. I have a framework itself and dSYM file for it.
归档我的应用程序时,归档文件不包含此框架的dSYM文件.它包含适用于这些框架的其他dSYM文件,这些文件已通过Cocoa Pods随附并与我的应用程序一起构建.
When archiving my app, the archive does not contain the dSYM file for this framework. It contains other dSYM files for ther frameworks that're included via Cocoa Pods and built alongside with my app.
我正在使用HockeyApp进行应用程序分发,因此我将应用程序IPA和dSYM存档上传到其中.但是由于缺少用于此精确框架的精确dSYM,因此无法在崩溃报告中看到所有堆栈跟踪.
I'm using HockeyApp for app distribution, so I'm uploading my app IPA and dSYMs archive to it. But because of lacking of this exact dSYM for this exact framework, I can't see all stack trace in crash reports.
所以问题是:我怎样才能请Xcode为该框架复制dSYM文件?我应该在归档过程中通过脚本手动执行此操作吗?
So The question:How can I kindly ask Xcode to copy dSYM file for the framework? Should I do this manually via script during archiving?
推荐答案
如果您具有预先构建的框架,则需要将在构建时生成的dSYM文件添加到Xcode项目中,并在您的Xcode项目中添加新的复制文件阶段"目标的Build阶段,以便最终将它们保存在Xcode归档文件中.
If you have pre-built frameworks you need to add the dSYM files generated at build time to your Xcode project and add a new "Copy Files Phase" to your target's Build phases in order to end up with them in the Xcode archive.
为Realm框架添加dSYM文件的示例如下图所示.
An example of adding the dSYM files for the Realm framework would look like the screenshot below.
确保选择产品目录"目标和仅在安装时复制"选项.
Make sure you select the "Products Directory" destination and the "Copy only when installing" option.
现在,在归档目标时,dSYMS将出现在正确的目录中.
Now, when archiving your target the dSYMS will appear in the right directory.
这篇关于如何将嵌入式框架的dSYM文件包含到应用程序存档中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!