我想尝试和象征我的iPhone应用程序的崩溃报告。

我从iTunes Connect上找到了崩溃报告。我有提交给App Store的应用程序二进制文件,我有作为构建的一部分生成的dSYM文件。

我将所有这些文件放在一个目录中,该目录以spotlight为索引。

现在该做什么?

我试着引用:

symbolicatecrash crashreport.crash myApp.app.dSYM

它只输出与崩溃报告开始时相同的文本,没有符号。

我做错什么了吗?


当前回答

我更喜欢一个脚本,将象征我的所有崩溃日志。

先决条件

创建一个文件夹,放4样东西:

symbolicatecrash perl script - there are many SO answers that tells it's location The archive of the build that match the crashes (from Xcode Organizer. simple as Show in Finder and copy) [I don't sure this is necessery] All the xccrashpoint packages - (from Xcode Organizer. Show in Finder, you may copy all the packages in the directory, or the single xccrashpoint you would like to symbolicate) Add that short script to the directory: #!/bin/sh echo "cleaning old crashes from directory" rm -P *.crash rm -P *.xccrashpoint rm -r allCrashes echo "removed!" echo "" echo "--- START ---" echo "" mkdir allCrashes mkdir symboledCrashes find `ls -d *.xccrashpoint` -name "*.crash" -print -exec cp {} allCrashes/ \; cd allCrashes for crash in *.crash; do ../symbolicatecrash $crash > ../symboledCrashes/V$crash done cd .. echo "" echo "--- DONE ---" echo ""

这个脚本

运行脚本时,将得到两个目录。

allCrashes -所有来自所有xccrashpoint的所有崩溃都会在那里。 symboledCrashes -相同的崩溃,但现在有了所有的符号。 你不需要在运行脚本之前从旧的崩溃中清理目录。它会自动清洗。好运!

其他回答

对我有效的组合是:

将dSYM文件复制到崩溃报告所在的目录中 解压包含应用程序的ipa文件(' Unzip MyApp.ipa') 将结果爆炸有效负载中的应用程序二进制文件复制到与崩溃报告和符号文件相同的文件夹中(类似于“MyApp.app/MyApp”) 从Xcode的管理器中导入或重新符号化崩溃报告

使用atos时,我无法用崩溃报告中的地址和偏移量解析正确的符号信息。当我这样做时,我看到了一些更有意义的东西,它似乎是一个合理的堆栈跟踪。

为了表示崩溃,Spotlight必须能够找到与您提交给Apple的二进制文件同时生成的. dsym文件。由于它包含符号信息,如果它不可用,那么您就不走运了。

我们使用谷歌Crashlytics来监督崩溃日志,感觉使用起来非常及时和方便。

文档链接: https://docs.fabric.io/apple/crashlytics/missing-dsyms.html#missing-dsyms

All about Missing dSYMs Fabric includes a tool to automatically upload your project’s dSYM. The tool is executed through the /run script, which is added to your Run Script Build Phase during the onboarding process. There can be certain situations however, when dSYM uploads fail because of unique project configurations or if you’re using Bitcode in your app. When an upload fails, Crashlytics isn’t able to symbolicate and display crashes, and a “Missing dSYM” alert will appear on your Fabric dashboard.

可以按照下面列出的步骤手动上传缺失的dsym。

注意: 作为自动化dSYM上传工具的替代方案,Fabric提供了一个命令行工具(upload-symbols),可以手动配置该工具,使其作为项目构建过程的一部分运行。有关配置说明,请参阅下面的上传符号部分。

...

我更喜欢一个脚本,将象征我的所有崩溃日志。

先决条件

创建一个文件夹,放4样东西:

symbolicatecrash perl script - there are many SO answers that tells it's location The archive of the build that match the crashes (from Xcode Organizer. simple as Show in Finder and copy) [I don't sure this is necessery] All the xccrashpoint packages - (from Xcode Organizer. Show in Finder, you may copy all the packages in the directory, or the single xccrashpoint you would like to symbolicate) Add that short script to the directory: #!/bin/sh echo "cleaning old crashes from directory" rm -P *.crash rm -P *.xccrashpoint rm -r allCrashes echo "removed!" echo "" echo "--- START ---" echo "" mkdir allCrashes mkdir symboledCrashes find `ls -d *.xccrashpoint` -name "*.crash" -print -exec cp {} allCrashes/ \; cd allCrashes for crash in *.crash; do ../symbolicatecrash $crash > ../symboledCrashes/V$crash done cd .. echo "" echo "--- DONE ---" echo ""

这个脚本

运行脚本时,将得到两个目录。

allCrashes -所有来自所有xccrashpoint的所有崩溃都会在那里。 symboledCrashes -相同的崩溃,但现在有了所有的符号。 你不需要在运行脚本之前从旧的崩溃中清理目录。它会自动清洗。好运!

分析苹果崩溃报告的步骤:

将推送到appstore的发布版.app文件、发布时创建的. dsym文件以及从APPLE收到的崩溃报告复制到一个文件夹中。 打开终端应用程序,进入上面创建的文件夹(使用cd命令) 执行命令atos -arch armv7 -o APPNAME。app /浏览器名称MEMORY_LOCATION_OF_CRASH。内存位置应该是应用程序根据报告崩溃的位置。

例如:atos -arch armv7 -o 'APPNAME。应用0 x0003b508”/“浏览器名称”

这将向您显示导致崩溃的确切方法名称。

[classname functionName:];-510年

Symbolicating音标

如果我们使用IPA作为符号-只要用。zip重命名扩展名。IPA,然后我们就可以得到一个包含app的有效载荷文件夹。在这种情况下,我们不需要. dsym文件。

Note

这只能在应用程序二进制没有符号剥离的情况下工作。默认情况下,发布版本会删除符号。我们可以在项目构建设置“复制过程中的条带调试符号”中将其更改为NO。

更多细节请看这篇文章